J
Jorgen Grahn
I couldn't think of a good solution, and it's hard to Google for...
I write python command-line programs under Win2k, and I use the bash shell
from Cygwin. I cannot use Cygwin's python package because of a binary
module which has to be compiled with Visual C 6.
My scripts start with a '#!/usr/bin/env python' shebang, as God intended.
Now, I assume I can make cmd.exe run foo.py by asociating *.py with the
python interpreter.
However, if foo.py is in my path and I try to run it from bash, what happens
is:
- bash runs env /cygdrive/h/bin/foo.py
- env runs something like 'python /cygdrive/h/bin/foo.py'
- ... and python (which doesn't know about Cygwin-style paths)
croaks on this, of course
Is there a way around this, which doesn't make my script unusable if I moved
it to a Unix box, or ran it from cmd.exe?
I'd prefer not to write wrapper scripts in perl/bash/BAT...
/Jorgen
I write python command-line programs under Win2k, and I use the bash shell
from Cygwin. I cannot use Cygwin's python package because of a binary
module which has to be compiled with Visual C 6.
My scripts start with a '#!/usr/bin/env python' shebang, as God intended.
Now, I assume I can make cmd.exe run foo.py by asociating *.py with the
python interpreter.
However, if foo.py is in my path and I try to run it from bash, what happens
is:
- bash runs env /cygdrive/h/bin/foo.py
- env runs something like 'python /cygdrive/h/bin/foo.py'
- ... and python (which doesn't know about Cygwin-style paths)
croaks on this, of course
Is there a way around this, which doesn't make my script unusable if I moved
it to a Unix box, or ran it from cmd.exe?
I'd prefer not to write wrapper scripts in perl/bash/BAT...
/Jorgen