pointing to the correct python

Steve Holden sholden at holdenweb.com
Sun Mar 16 21:58:19 EST 2003


"Bob Roberts" <bobnotbob at byu.edu> wrote ...
> I am running cygwin under windows.  If I have a python program that
> starts with
> #!/usr/bin/python
> it uses the cygwin python, which for most stuff is fine.  But I need
> to use the windows version of python any time I want to use PIL,
> pygame, etc..  How do I tell the environment which python to use
> (besides using #!/n/Python22/python)?

And what's the problem with making the Python versioon explicit in that way?
In fact you can find there are other problems mixing the cygwin environment
with the standard Windows Python interpreter, most importantly that the
latter won't understand the cygwin paths you pass to it.

Certainly putting an appropriate shebang line seems much more useful than
changing "the environment": presumably you want to call these scripts by
name rather than explicitly invoking the Python interpreter?

The real solution is to port those applications to cygwin, but I appreciate
that might require an excessive amount of effort.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list