organizing many python scripts, in a large corporate environment.

eryksun () eryksun at gmail.com
Thu Mar 17 08:46:38 EDT 2011


On Wednesday, March 16, 2011 9:03:19 PM UTC-4, bukzor wrote:
>
> I finally understand. You mean something along the lines of `kde-
> config`: an executable to help figure out the configuration at
> runtime. This requires either installation or control of the $PATH
> environment variable to work well, which makes not so useful to me.

There's always the virtualenv option in a POSIX system. Just change the shebang to point to your package's virtual Python installation. That obviously won't work for Windows, which uses system-wide file-type associations. I think the closest to shebang-style control on Windows would require changing the file extension to something like 'py_' and having an admin add the appropriate ftype/assoc to the system, the same as is done for the pyw extension. That would be obscene.

If the problem with installation is merely continuing to have central access to the scripts for development, you could deploy with setuptools in development mode:

http://packages.python.org/distribute/setuptools.html#development-mode
http://packages.python.org/distribute/setuptools.html#develop

However, I think over time you may come to regret this as other group's projects become dependent on your code's behavior (including bugs) and a rigid interface.



More information about the Python-list mailing list