[Distutils] setuptools, PYTHONPATH and suExec

Ian Bicking ianb at colorstudy.com
Wed Apr 26 21:48:11 CEST 2006

Joe Gregorio wrote:
> Is there a way to get this to work or am I out of luck?

You might try workingenv: http://svn.colorstudy.com/home/ianb/workingenv

If you use it, scripts installed via setuptools/easy_install will adjust 
their path automatically.  In a CGI script you can do:

   #!/usr/bin/env python -S
   import sys
   sys.path.insert(0, 'path/to/lib/python')
   import site
   ... other stuff ...

I'm not 100% sure how well that #! line will work on all operating 
systems; I haven't tested this out much on different systems.

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Distutils-SIG mailing list