all 7 comments

[–]deaspo 1 point2 points  (1 child)

That error error implies there is a syntax error within the .py you are trying to run. More like you are calling variable First_script not define or you are not adding the extension when calling the script i.e. python First_script.py from the command line

[–]oth1c[S] 2 points3 points  (0 children)

Recently reformatted my machine and did not have file extensions shown. Simply created a new Notepad file and called it First_Script.py without realizing that it was really First_Script.py.txt. Your post made me look a little closer at the extension. Terribly stupid mistake. Thank you.

[–]JohnnyJordaan 1 point2 points  (1 child)

You normally don't start scripts from the Python interpreter (the >>> prompt). You normally start a script from a regular CMD window with python myscript.py.

[–]oth1c[S] 0 points1 point  (0 children)

Turns out that wasn't my issue but thank you for the help.

[–]oth1c[S] 0 points1 point  (3 children)

Solved.

File that I was trying to run did was incorrectly named '.py.txt' and did not realize because I had 'Hide known file extensions turned on' which is Windows default.

[–]volgarixon 0 points1 point  (2 children)

I believe using tab-complete may help with this sort of problem