[Tutor] Running Files with Command Lines
talmidim at live.com
Sun Feb 12 08:24:58 CET 2012
I'm trying to learn Python from a well known book, and i'm stuck with something that i know that might seem surprisingly easy for you and i would like to humbly request your help:
i created a script in a file named script1.py and i saved it in the folder named python journey located in this path c:\users\myusername\documents\varios 2\python journey\
i tested the script1.py file via the GUI and it works fine...BUT!...i have been trying to run it via the Python command line and the Windows CMD... UNSUCCESSFULLY :(
the instructions given in the book are these as follows:
"Once you’ve saved this text file, you can ask Python to run it by listing its full filename as the first argument to a python command, typed at the system shell prompt:"
% python script1.py
"Again, you can type such a system shell command in whatever your system provides for command-line entry—a Windows Command Prompt window, an xterm window,or similar. Remember to replace “python” with a full directory path, as before, if your PATH setting is not configured."
what i did was this:
I typed all this options:
c:\users\myusername\documents\varios 2\python journey> script1.py
c:\users\myusername\documents\varios 2\python journey\ script1.py
c:\users\myusername\documents\varios 2\python journey\script1.py
what am i doing wrong? can somebody please help me?
More information about the Tutor