Windows 10 Python Problem

Kevin Hu

Well-Known Member
Hey guys, I installed Python and I had some problems with running it form the console. It runs perfectly fine with IDLE 32 bit, but when I saved it and run from Python, it flashes and exit the program. I attached a video to show what's wrong.
 

Attachments

  • Video.7z
    4.4 MB · Views: 197
I don't know what that is. I attached the file of code I wrote. I don't know if it's the language compatibility(the code is in Chinese) or the python itself.
 

Attachments

  • py.zip
    460 bytes · Views: 189
I don't know what that is. I attached the file of code I wrote. I don't know if it's the language compatibility(the code is in Chinese) or the python itself.
 

Attachments

  • py.zip
    460 bytes · Views: 179
I would open a command prompt and just type python if you get a >>> prompt then python is in the path variable. if it errors out you need to add the path to the python executable to the path environment variable. If you don't get an error then type python <your python file> and see of it generates an error.
 
My command prompt run python just fine. But when I drag the .py file to command prompt. It says "File "<stdin>", line 1 syntax error: invalid syntax. When I tested in idle, there's no syntax error
 
If you're trying to run it from within the interpreter you will get this error.
 
Back
Top