Subject: Running Python Scripts
To: None <netbsd-users@NetBSD.org>
From: Gary Parker <G.J.Parker@lboro.ac.uk>
List: netbsd-users
Date: 01/11/2005 16:23:31
Howdy all,
	today I compiled and installed python24-pth on my sparcstation 20
running NetBSD 2.0

It all seems to run quite nicely and with no errors except that scripts
starting with the traditional:

#!/usr/bin/env python

...fail as the output of 'env python' doesn't actually give you the contents
of the python environment variable (which I have manually set to
/usr/pkg/bin/python2p4) but, rather, gives the following error message:

env: python: No such file or directory

It would appear that /usr/bin/env is trying to run the argument 'python' as
an executable rather than just printing out the variable's content.

Obviously I can replace '#!/usr/bin/env python' with
'#!/usr/pkg/bin/python2p4' in any given script and it will run quite happily
but as the former case seems to be the Internet standard for python files I
wondered if there was a better way to make this work on NetBSD?

--
/-Gary Parker-----------------------f-Loughborough University-\
n IT Bandwidth Management Specialist - http://www.bmas.ja.net |
| Computing Services      - http://www.lboro.ac.uk/computing/ o
\r----------------------------------------------------------d-/