Issues with Python + Batch File

Gabriel Genellina gagsl-py2 at
Tue Mar 25 17:47:34 CET 2008

En Tue, 25 Mar 2008 08:55:12 -0300, tarun <tarundevnani at>  

> I've a batch file which invoks a python file. The python code in the file
> brings up a GUI. The GUI is of a test tool which can execute scripts.
> I tried using the following 2 sample of code for my batch file:
> *     (1)                       (2)*
> D:\              D:\
> goto:end                   goto:end
> :end                       :end
> EXIT                       TASKKILL /IM C:\WINDOWS\system32\cmd.exe
> Double clicking on the batch file brings up a DOS BOX which opens up the
> GUI. On Closing the GUI, the DOS BOX both get closed. But if I close the  
> when a test is under execution, the GUI gets closed but the DOS BOX still
> remains open.
> I want to some how close the DOS BOX when the GUI is closed.

Either rename the script "opengui.pyw" or start it explicitely using:  
pythonw d:\

pythonw.exe doesn't create a console (what you call a "DOS BOX").

Gabriel Genellina

More information about the Python-list mailing list