Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

How do you run a .py program?

OpenStudy (anonymous):

In IDLE: F5. If you run it from Windows, it should open in command prompt.

OpenStudy (anonymous):

how does the python shell know where the file is?

OpenStudy (anonymous):

I'm not sure what you mean. If you run IDLE by itself, just press Ctrl+O, pick a file, and IDLE will open it in the code editor. When you press F5 in the code editor, IDLE will run your code in the shell.

OpenStudy (anonymous):

or you could use the command line. Open cmd/terminal and browse till you get to the directory that holds your .py application, then run "python NAME_OF_YOUR_APPLICATION.py"

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!