The way we handle non-root deployment at work is using virtualenv (http://pypi.python.org/pypi/virtualenv). You can run the package's virtualenv.py directly if you don't have it installed, or just 'virtualenv' on the command line if you do.
For instance, you could create ~/virtualenvs/twitterbot/, and then make sure you use the binaries (python, easy_install) that were created in ~/virtualenvs/twitterbot/bin rather than the system's defaults. Then you can easy_install into there as non-root.
One thing I'd say about easy_install is that it's generally better to run it with the -Z switch, because zipped eggs can cause you some trouble later if you're trying to run an application as a user who doesn't have a home directory (such as www-data/apache), because it doesn't have anywhere to unzip too. Plus, I've noticed tracebacks tend to be a little odd when using zipped eggs.
You can put semicolons if you want :). I'm not sure why that's still a feature in Python, though...
Are lists that different to arrays?
The rest looks great, anyway. Quick shorthand: fcount += 1 instead of fcount = fcount + 1
no subject
on 2011-03-02 12:18 pm (UTC)The way we handle non-root deployment at work is using virtualenv (http://pypi.python.org/pypi/virtualenv). You can run the package's virtualenv.py directly if you don't have it installed, or just 'virtualenv' on the command line if you do.
For instance, you could create ~/virtualenvs/twitterbot/, and then make sure you use the binaries (python, easy_install) that were created in ~/virtualenvs/twitterbot/bin rather than the system's defaults. Then you can easy_install into there as non-root.
One thing I'd say about easy_install is that it's generally better to run it with the -Z switch, because zipped eggs can cause you some trouble later if you're trying to run an application as a user who doesn't have a home directory (such as www-data/apache), because it doesn't have anywhere to unzip too. Plus, I've noticed tracebacks tend to be a little odd when using zipped eggs.
You can put semicolons if you want :). I'm not sure why that's still a feature in Python, though...
Are lists that different to arrays?
The rest looks great, anyway. Quick shorthand: fcount += 1 instead of fcount = fcount + 1