+ 2

How to run python programs?

I'm new to python and just downloaded the python program. I want to run some python code but not sure how using the Python program. I also heard you could run it in the Windows terminal but what would be the use of the Python program then? Thanks ~

21st May 2017, 5:54 PM
Hannah Bernal
Hannah Bernal - avatar
4 ответов
+ 3
also when you installed python on windows you may have also installed the idle editor. from idle you can run directly some python simple commands. you can also run a separate python script using the menu : file > open > yourfile.py and then from the module window: run >run module
21st May 2017, 6:43 PM
ifl
ifl - avatar
+ 1
if you want to run it from the console as James suggests, you need to add the pyton bin folder to the path.
22nd May 2017, 4:05 AM
ifl
ifl - avatar
0
I've tried typing that in the Windows cmd but it says I can't open the file since there's no such file or directory? I'll try working on that more, James. But thank you! But it does work when I run it as a separate python script, ifl. Thank you!
21st May 2017, 9:13 PM
Hannah Bernal
Hannah Bernal - avatar
0
To the windows path? Does the bin folder come with python?
22nd May 2017, 10:46 PM
Hannah Bernal
Hannah Bernal - avatar