[Tutor] Shebang problem
Kalle Svensson
kalle@lysator.liu.se
Fri Jun 27 12:33:08 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[Rick Thomas]
> I'm very new to programming and am plodding my way through Alan
> Gauld's book 'Learn to Program Using Python'. At present I can't
> get my programs to execute using the Shebang trick.
>
> #!/usr/bin/python
>
> My scripts ran fine when I was using SuSE 7.3 but I've recently
> upgraded to 8.3 and wondered if this is somehow the problem. My
> scripts run ok if I type for example 'python foo.py' in a terminal.
Have you checked the permissions on the files? They should be
executable (+x) for the user trying to run them. If the permissions
are right, what error message do you get when trying to run them?
Where is the python executable located (you can get this by running
"type -p python" or "which python")? Does it work if you have a line
like
#!/usr/bin/env python
instead?
Peace,
Kalle
- --
Kalle Svensson, http://www.juckapan.org/~kalle/
Student, root and saint in the Church of Emacs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQE+/HF2dNeA1787sd0RAtvhAJ9oOcrVxOUvxBQW3bWGBoqO9Yi5rgCgsQVl
7+s8Opjt+gbSPzcYEE2ebnE=
=hN1P
-----END PGP SIGNATURE-----