[Tutor] hello.py: line 1: print: command not found

Cullen Newsom cullennewsom at yahoo.com
Sun Dec 5 01:53:55 CET 2004


Hello List,

    Here is my Error:
hello.py: line 1: print: command not found
    Here is my cat hello.py:
<cat hello.py>
nooseisloose at linux:~> cat hello.py
#!/usr/bin/python

print "Hello, world!"

nooseisloose at linux:~>
</cat hello.py>

    Here is some info which might help that I learned from an
earlier post:
<look for newlines>
>>> print repr(open('/home/nooseisloose/hello.py',
'rb').read(160))
'#!/usr/bin/python\n\nprint "Hello, world!"\n\n'
>>>
</look for newlines>
    Here is my echo $PATH:
<PATH>
nooseisloose at linux:~> echo $PATH
/home/nooseisloose/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin:/usr/bin/python:/usr/bin/python:/usr/lib/python:/usr/lib/python2.3/
nooseisloose at linux:~>
</PATH>

    Everything runs fine from root.  I am running SuSE 9.1 Linux
linux 2.6.4-52-default

    I know this is a Linux question (or SuSE question) as much
as a python question, but I do not think there is a more
appropriate place to ask this question, and hopefully it will
help save someone some time and frustration, especially since a
person new to Python might well believe it to be a problem with
Python.
    Anyone know the proper thing to set, or change?  Thanks.

Cullen


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 


More information about the Tutor mailing list