suppressing dos box, os.spawnv()

Duncan Smith buzzard at urubu.freeserve.co.uk
Sat Jan 18 12:04:04 EST 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.

Duncan

>>> 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\\tree.dot', '-o', 'C:\\Python22\\atree.png'))
852
>>>






More information about the Python-list mailing list