syntax error in first-time user script

Deborah Swanson python at deborahswanson.net
Sat Mar 25 21:38:37 EDT 2017


john polo wrote, on March 25, 2017 2:45 PM
> 
> I had a misconception of how the Python interpreter works. If 
> I have a 
> script, call it example.py, in order to run it, I shouldn't be in the 
> interpreter? In other words, I should be at the Windows 
> command prompt, 
> for example
> 
> C:/test> python example.py
> 
> and not
> 
>  >>> python example.py
> 
> ?
> 
> So, if I am already on >>> and have a problem with a script 
> and need to 
> edit it and want to run the script again, how do I do that? Do I exit 
> the interpreter and start it again? Or is there a different 
> way to run 
> the script once the interpreter is active and I am at >>> ?
> 
> Cheers,
> John

In IDLE, to run a script, open the .py file from the file menu and click
Run Module from the Run menu. You can easily edit the .py file while
it's open in the editor



More information about the Python-list mailing list