bukzor wrote:
> This only works if you can edit the PYTHONPATH. With thousands of
> users and dozens of groups each with their own custom environments,
> this is a herculean effort.

It works for me without setting PYTHONPATH. Again, I run the module from the 
root folder with the -m option as a package module (no .py extension), which is 
easy enough to do with a Windows shortcut. 

No doubt there's a way to hack things to make direct execution work, but I 
don't think it's recommended to directly run a script that's part of a package 
namespace. Experts on the subject can feel free to chime in. 

If you need a site-wide solution that works with Unix shebang, you could 
symlink the names of all the scripts to a dispatcher. Extract the name from 
argv[0] based on the symlink filename, and then find the script in the package 
(or periodically update a stored hash of all scripts). Have the dispatcher run 
it as a package module with `python -m path.to.module [args]`. 

I hope someone else has a better idea...

--
EOF
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to