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

John J. Lee jjl at pobox.com
Wed Nov 28 07:22:05 EST 2001


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:

#!/bin/sh

python='/d/Program Files/Python21/python'
if [ "$1" = "" ]; then exec "$python"; fi
cp=`cygpath -w $1`
shift
exec "$python" "$cp" ${1+"$@"}


which, finally, seems to actually launch the standard Windows Python
exectuable from cygwin reasonably well.  Of course, you may still have
trouble with paths in the arguments, but that can be dealt with in Python,
thankfully.  Just stick the above script in cygwin's /usr/local/bin in a
file named python.


John




More information about the Python-list mailing list