[Tutor] Making Window stay open, Python in Windows
alan.gauld@bt.com
alan.gauld@bt.com
Tue, 15 Feb 2000 11:56:00 -0000
> that after a type a program and run it the window closes
> before I can view the output. How can I correct this?
Start a DOS box on its own then at the DOS prompt CD into
your python project directory and invoke python by typing:
C:\MyprojectDir> python spam.py
Where:
MyProjectDir is where you keep your python files and
spam.py is your program file
Alternatively:
Make sure your PYTHONPATH environment variable is
set up (in autoexec.bat) to include any directories
with your modules in. Then you can type from any
Dos prompt:
C:\> python C:\MyProjectDir\spam.py
Then python will finish executing and the results will
be displayed in the DOS box. You might want to make
the DOS box 50 lines long to ensure you capture as
much as possible...
Alan G.