Last time we learned how to create modules and packages. Today we're going to take the package we created and use Python's distutils to create a couple different ways to distribute our code. In this tutorial, we'll be learning the following: How to create a setup.py file How to create a source distribution How to […]
Creating Python modules is something that most Python programmers do every day. Any time you save a new Python script, you have created a new module. You can import your module into other modules. A package is a collection of modules. The things you import into your scripts from the standard library are modules or […]
Whether you're new to Python, been using it for a few years or you're an expert, knowing how to use Python's introspection capabilities can help your understanding of your code and that new package you just downloaded with the crappy documentation. Introspection is a fancy word that means to observe oneself and ponder one's thoughts, […]
September 4, 2010 by
Mike When I began learning Python, one of the first things I needed to know how to do was open a file. Now, the term "open a file" can mean different things depending on the context. Sometimes it means to actually open the file with Python and read from it, like with a text file. Other […]