On Monday 05 September 2005 21:54, presentt <presentt at gmail.com> (<1125978845.080791.14520 at g43g2000cwa.googlegroups.com>) 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4