[Tutor] Re opening programs

Alan Gauld alan.gauld@freenet.co.uk
Tue, 06 Feb 2001 10:11:39 +0000

> I have windows 98 ie5.0 and downloaded python2.0. To open a program
> (hello.py) while in idle I click file/open/documents/hello/open
> is there a different or quicker way to do this? 

To run the program or to edit it?

To run the program type:

python hello.py from an MS DOS command promt(aka DOS box)
or just double click it from windows explorer(aka My computer).

Alternatively right click in explorer and select open.

You may find that it runs then closes again too quicvkly to vbe usefult in
which case try adding the line:

raw_input("Hit enter to exit") at the end.

[BTW,  I love the contradiction in that, oh so common, phrase :-) ]

To edit it in IDLE right click in explorer and select edit, 
it will start IDLE with your program loaded in an editor window.

There is a command line option to IDLE too, I think its /e thius:

 python idle.py /e hello.py

But thats a bit messy IMHO...


Alan G
(Catching up on several days tutor messages)