On Monday 05 September 2005 21:54, presentt <[EMAIL PROTECTED]> (<[EMAIL PROTECTED]>) wrote:
> So I created a file named helloworld.py, and put in it: > > #! /usr/bin/env python > print "Hello, world!" > > and then used > $ chmod +x helloworld.py > to set the permissions. Finally, I went to my terminal and typed > $ helloworld.py > but I was given the bash: helloworld.py: command not found error. > > Can someone tell me > (1)Am I right in saying that something is directly executable if I can > enter the filename in the command line and it runs? Almost. For more information, you might read about the PATH variable. > (2)Am I setting up the script to be directly executable correctly? Yes. > and (3)Am I trying to run the directly executable script correctly? No. The best (safest) method is to type ./helloworld.py to tell your shell that the script is in the current directory. -- http://mail.python.org/mailman/listinfo/python-list