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

How do I run a program once I've written it? Is it with Python Console? If so, where do I find this console? I'm working on a PC. I think I've got ps0, just want to test it.

OpenStudy (anonymous):

If you're using IDLE(Python GUI), just hit F5 or choose Run Module from the Run tab, and call the function you want to test in python shell (just type its name with parameters).

OpenStudy (anonymous):

If you haven't found IDLE yet, it's tucked away in the "idlelib" folder in "Lib", inside your Python folder. I'm using Windows, so mine was the Windows batch file called "idle". If there's a more obvious way to open it, I haven't found it. Once you do that, you can go into the File tab there and open a new window, where you can write and execute programs. You can run your program just as karim described.

OpenStudy (lowfriction):

I was frustrated with this at first too as they didn't seem to mention this detail in the lectures or I missed it. Slightly important detail.

OpenStudy (carlsmith):

You should be able to open a console and enter python /path/to/file.py You don't have to use IDLE to run a script.

OpenStudy (anonymous):

Thanks everyone! Yeah, I'm pretty new. I didn't reallize I had to write programs in a new window. I thought I could write them in the shell. But now I'm a total pro and on to ps1! ;)

OpenStudy (jackedowns):

Whew, thanks for asking this Rachel! I came back here after about 50 minutes of reading the wiki to find out I need to open a new window and not run it in the console window! I am thinking this is a bad sign for me already lol

OpenStudy (anonymous):

Well, I didn't. So you shouldn't worry about it either :)

OpenStudy (anonymous):

Had the same probl ;) here's the code for my problem set 0: http://dpaste.com/800737/ But when i run it after i saved as a new file, the last print statment runs so fast one can hardly say that it displays name and age so im not sure if i solve it or not..

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!