Here are some development guidelines when working with python.
Java has Maven, Ruby has Gems, Perl has CPAN, Python has pypi.
The PYthon Package Index is the index for all python packages. Most packages that you use will be on pypi.
virtualenv is the preferred way to create isolated python environments.
It creates a sandboxed python environment.
This will create a directory – env – in the current working directory which contain the "virtual" python that you will need to use. You can switch into the environment like so (assuming a Bourne-compatible shell):
Activate, you have to do this in order to use the environment.
Installing your dependencies
Now, say that you want to use Django. You can do so:
Managing your dependencies
Working with someone? Then you should put a "
requirements.txt" file on the top-level. A sample requirements file looks like:
Then, your buddy can install all the right packages simply by running:
SPACES NOT TABS
This is not Java
When in doubt, follow PEP 8.