[Tutor] Running Files with Command Lines

bob gailer bgailer at gmail.com
Sun Feb 12 12:06:22 CET 2012

On 2/12/2012 2:21 AM, Yony Torres wrote:
> Hello buddies
> 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 
> 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?

Thanks for asking. When you ask for help please tell us which version of 
Python and what OS you are running, and what (if any) errors or 
unexpected results you are getting. The more info you give us the easier 
it is for us to help.

Also be sure to reply-all so a copy goes to the list.

The directions you were given are hard to follow, and a lot depends on 
how your system is configured. Once we see the error you are getting we 
can better help.

Bob Gailer
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120212/85866718/attachment.html>

More information about the Tutor mailing list