On 15/03/12 22:39, Tamar Osher wrote:
try:
import os
# my program
finally:
input ('\n\t\t\tPress the enter key to continue.')
os.system ('pause')
It's more conventional to put the import at the very top, before the
try: line.
But otherwise what you have should be fine. There are other ways of
doing it and eventually you may write programs that don't require the
press enter... line and you can then miss out all of the code above. But
for learning that's fine.
Or just run your programs inside IDLE or, as someone else suggested,
Eclipse and PyDev (although personally that seems like overkill!)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor