Executing scripts
Peter Hansen
peter at engcorp.com
Thu Jul 10 12:31:06 EDT 2003
Ken Fettig wrote:
>
> I am having a problem executing scripts from python. The script is located
> at C:\Python22\learn and is named more.py. This is an example from the
> Programming Python book by Mark Lutz published by O'Reilly. I have tried how
> the author outlines to execute the script but it doesn't work. I am on a
> Windows 2000 machine.
> The example shows to, at the command line, enter C:\Python22\learn>python
> more.py more.py. I get the following output:
> >>> C:\Python22\learn>python more.py more.py
> File "<stdin>", line 1
> C:\Python22\learn>python more.py more.py
> ^
> I have tried many combinations all unsuccessfully. Can someone please help
> me????
You are not at the right command line. The >>> indicates you have already
run Python, but are trying to execute a DOS command line at the *Python*
prompt.
See http://www.python.org/cgi-bin/faqw.py?req=show&file=faq08.018.htp
-Peter
More information about the Python-list
mailing list