suppressing dos box, os.spawnv()

Duncan Smith buzzard at
Sat Jan 18 18:04:04 CET 2003

Firstly I'm not 100% sure I'm using the ideal function, but os.spawnv()
seems to do a decent job of running a single command.  (But how about a
session containing several commands?)  Secondly, I need to suppress the dos
window that momentarily pops up when the following code is executed.  Anyone
know how I can do that?  I'm currently using Windows2000, but my final code
will also have to run under Unix.  Cheers.


>>> import os
>>> os.spawnv(os.P_NOWAIT, 'C:\\PROGRA~1\\ATT\\Graphviz\\bin\\dot.exe',
('C:\\PROGRA~1\\ATT\\Graphviz\\bin\\dot.exe', '-Tpng',
'C:\\Python22\\', '-o', 'C:\\Python22\\atree.png'))

More information about the Python-list mailing list