problem executing python scripts in cygwin bash shell

D-Man dsh8290 at rit.edu
Thu Apr 5 14:18:51 EDT 2001


On Thu, Apr 05, 2001 at 12:58:39PM -0500, David Humphrey wrote:
| I'm sure this one has been answered before, but I couldn't find the solution
| in any of the newgroups, 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.

Put

#!/usr/bin/env python

as the first line.  Then make sure that an executable named 'python'
is in the path.

For me it is:

$ type python
python is /home/derrick/rc/bin/python

('type' is very similar to 'which', but 'which' DNE in cygwin)

That file looks like :

#!/bin/bash

//d/apps/Python20/python.exe $*



-D





More information about the Python-list mailing list