newbie trouble with #!

Bernd Prager vze2nbmq at verizon.net
Tue May 15 18:18:22 EDT 2001


Hi,

I start completely new with python and have a very simple question:

I'm havin trouble with the shebang line in python.

-- snip -----------
[root:/etc/ipcheck]# type python
python is hashed (/usr/bin/python)

[root:/etc/ipcheck]# head ipcheck.py
#! /usr/bin/python

import base64, getopt, urllib, httplib, os, re, sys, stat, string, time,
telnetlib, socket

try:
  import syslog
except:  # for platforms without syslog that try to use --syslog option
  class fake_syslog:
    def openlog(self,foo):
      raise Exception("Syslog not supported on this platform")

[root:/etc/ipcheck]# ./ipcheck.py
bash: ./ipcheck.py: No such file or directory

-- snip -----------

When I type /usr/bin/python ipcheck.py everything works fine.
I'm using Python 1.5.2. Does anybody have an idea what that could be.
(I was already checking if I got some weird character within the first line:
I didn't!)

Thanks for your help,
-- Bernd






More information about the Python-list mailing list