On 3/23/2017 9:57 PM, john polo wrote:
If I use IDLE shell:
"python comment.py"
"SyntaxError: invalid syntax"
IDLE's Shell runs your input with nearly identical results as with the
standard interactive interpreter, including exceptions.
I know I can open the file in the editor and use F5, but shouldn't I be
able to use a command from shell?
No. You enter Python statements, not terminal commands.
> How do I run comment.py from a command line without error?
At the Command Prompt window's prompt, such as 'C:\user\you>', enter
python path/to/comment.py
The path shown before the prompt char, '>', is the 'current working
directory'. Learn to use the 'cd' command.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list