T
tkpmep
Instead of starting IDLE as I normally do, I started the Python
interpreter and tried to run a program. I got a Python prompt (>>>),
and then tried unsuccessfully to run a Python script named Script1.py
that runs perfectly well in IDLE. Here's what I did:
Traceback (most recent call last):
File "<stdin>", line 1
python Script1.py
SyntaxError: invalid syntax
I can load it (and have it execute) by typing
0
1
2
3
4
and if I edit it, I can then execute it by reloading it
0
1
2
3
4
<module 'Script1' from 'Script1.pyc'>
But this seems contrived - is there no way to repeatedly run Script1
from the interpreter without reloading it?
Thomas Philips
interpreter and tried to run a program. I got a Python prompt (>>>),
and then tried unsuccessfully to run a Python script named Script1.py
that runs perfectly well in IDLE. Here's what I did:
Traceback (most recent call last):
File "<stdin>", line 1
python Script1.py
SyntaxError: invalid syntax
I can load it (and have it execute) by typing
0
1
2
3
4
and if I edit it, I can then execute it by reloading it
0
1
2
3
4
<module 'Script1' from 'Script1.pyc'>
But this seems contrived - is there no way to repeatedly run Script1
from the interpreter without reloading it?
Thomas Philips