Issues with Python + Batch File

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Mar 25 17:47:34 CET 2008


En Tue, 25 Mar 2008 08:55:12 -0300, tarun <tarundevnani at gmail.com>  
escribió:

> 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:\opengui.py              D:\opengui.py
> 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  
> GUI
> 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:\opengui.py

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

-- 
Gabriel Genellina




More information about the Python-list mailing list