problem executing python scripts in cygwin bash shell
Mark Hadfield
m.hadfield at niwa.cri.nz
Thu Apr 5 18:37:36 EDT 2001
From: "David Humphrey" <dhumphrey at pdqdot.net>
> I'm sure this one has been answered before, but I couldn't find the
solution
> in any of the newsgroups, so here goes again.
>
> I can run bash scripts that are in the path but not python scripts. Each
> script has the appropriate (I think) #! declaration on the first line.
> ...
> From this, I infer that cygwin bash understands the #! notation properly,
so
> I must have a problem with paths or some other configuration parameter.
> ....
> GNU bash, version 2.04.5(12)-release (i686-pc-cygwin)
> ActiveState Python 2.0.3
ActiveState Python, being a Win32 build, does not understand the script name
fed to it, because it is in Unix form.
Perhaps you could wrap python.exe in a script or C program that does the
Unix->Windows conversion, then invoke the wrapper in the #! line. I've never
bothered, because I can always invoke the script as
$ python script-name
---
Mark Hadfield
m.hadfield at niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research
--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
More information about the Python-list
mailing list