On 26/10/2012 19:02, Thomas Kluyver wrote: > On 26 October 2012 11:53, Chow Loong Jin <hyperair@debian.org> wrote: >>> What is the definition of "system" script? >> >> Any script installed via dpkg, perhaps? > > I wouldn't have said so - I install plenty of Python scripts from > packages, like /usr/bin/ipython, that I wouldn't call system scripts. > I don't think there's a robust distinction on Linux, but there's > loosely a difference between system components and user applications. For the purposes of this discussion I would be inclined to define system scripts to be scripts installed by the system administrator, i.e. stuff that gets installed via dpkg, while user scripts are scripts that are installed by the user in his/her $HOME. So with that definition in place, are there any global scripts installed by the system administrator that should honour the PYTHONHOME/PYTHONPATH environment variables? When I run these scripts, I'd expect them to use whatever they came with, or you could end up with $script importing $private_module of a different version and then crashing due to incompatibilities. In the case of django-admin, I'd be inclined to treat it as a global script as described above, as you should be using ./manage.py for your local-repo administration tasks anyway, if you really intend to use it with a virtualenv. And if you really need to use django-admin with a virtualenv, then django-admin.py resolves to the in-virtualenv django-admin. django-admin without the extension is a Debianism. ipython as mentioned in a different post, would be an exception to the rule -- I would want it to the environment variables so I can play with things inside a virtualenv. -- Kind regards, Loong Jin
Attachment:
signature.asc
Description: OpenPGP digital signature