Launch windows batch file from wxPython (2 requirements)

I want the following to happen when I launch a windows bat file from
wxPython:
1) No "dos-window" should appear on the screen.
2) My GUI should wait until the bat file finish.

So far I'm only able to satisfy 1 of the requirements:

os.system('my.bat > nul')
os.spawnv( os.P_WAIT, 'my.bat', ('my.bat',' > nul') )
dump = os.popen( 'my.bat' )

The first two waits for the process to finish, but display the anoying
dos-window.
The last one does not display the dos-window but don't wait for the bat file
to complete.

Is there a third option? Can Python/wxPython handle both requirements at the
same time?

Thanks for any help!
Jens

···

**********************************************************************
Neither the confidentiality nor the integrity of this message
can be guaranteed following transmission on the Internet.
This message has been swept by MAILsweeper at DNV for
the presence of computer viruses.
**********************************************************************

Does the last option work if you read the entire contents, like so:
dump = os.popen('my.bat').read()

···

On Wednesday 12 March 2003 01:14 am, Jens.Bloch.Helmers@dnv.com wrote:

I want the following to happen when I launch a windows bat file from
wxPython:
1) No "dos-window" should appear on the screen.
2) My GUI should wait until the bat file finish.

So far I'm only able to satisfy 1 of the requirements:

os.system('my.bat > nul')
os.spawnv( os.P_WAIT, 'my.bat', ('my.bat',' > nul') )
dump = os.popen( 'my.bat' )

The first two waits for the process to finish, but display the
anoying dos-window.
The last one does not display the dos-window but don't wait for the
bat file to complete.

Is there a third option? Can Python/wxPython handle both requirements
at the same time?

Thanks for any help!
Jens

--
Chuck
http://ChuckEsterbrook.com