std. python from cygwin: the final word (?)

John J. Lee jjl at pobox.com
Thu Nov 29 09:22:32 EST 2001


On Wed, 28 Nov 2001, Jason Tishler wrote:
[...]
> On Wed, Nov 28, 2001 at 12:22:05PM +0000, John J. Lee wrote:
> > After several, surprising long, threads, the collective brain power of
> > c.l.python and the cygwin mailing list has produced the following magical
> > shell incantations:
[...]
> If you are willing to use rxvt, then the following trigger is a simpler
> alternative:
>
>     #!/usr/bin/env pythonw

Thanks, but:

1. why does it help to use pythonw?

2. why does your solution require rxvt (rather than the std. windows
terminal used by cygwin)?

Just to make sure we're not talking at x-purposes: the shell script I sent
was intended to be run instead of python, so that it can munge the
(possibly cygwin-style) path of the script before passing it to the real
python, while still getting sys.argv right at the same time, so you can
type

./script.py

or python /home/john/script.py

or ./script.py /foo/bar

or python script.py ./foo

etc, and have everything work as expected, even though you're using
MSVC-compiled python with no cygwin support.


John




More information about the Python-list mailing list