I decided that it would be useful for me to go beyond my .NET bubble and start experimenting with other technologies. I have Ubuntu12 running and python2.7 and 3.2 are installed. I can run the code directly in the interpreters.
I have a basic script in the Standalone.py file system:
#!/usr/bin/env python3.2 import sys print("this is a standalone script.")
When I'm at my bash prompt, I type $ python3.2 Standalone.py
. I get an answer saying this is a standalone script
. But when I type $ Standalone.py
, then it tells me that the command was not found.
How to run such scripts?
Thanks for any help.
Update
I changed the permissions of Standalone.py to 755. Then I ran the command:
$ ./Standalone.py
and received a message:
: No such file or directory
Then I switched the permissions of Standalone.py back to 644. Then, when I started
$ ./Standalone.py
I got a message
-bash: ./Standalone.py: Permission denied
Is there something I am missing?
source share