Saving and Executing Your Programs :
First of all, you need a text editor, preferably one intended for programming. (If you use
something like Microsoft Word, which I don’t really recommend, be sure to save your code as
plain text.)
With IDLE, you can simply create a new editor window with File >> New Window.
Another window appears, without an interactive prompt.
Whew! Start by entering the following:
print "Hello, world!"
Now select File >> Save to save your program (which is, in fact, a plain text file).
Be sure to put it somewhere where you can find it later. You might want to create a directory where you put all your Python projects, such as C:\python in Windows.
In a UNIX environment, you might use a directory like ~/python. Give your file any reasonable name, such as hello.py. The .py ending is important.
No comments:
Post a Comment