Entry
How would one go about preventing output of a program called through spawnv from getting printed to the console?
Aug 9th, 2000 02:56
unknown unknown, j vickroy
From pages 325,326 of "Python Programming on Win32" by Mark Hammond and
Andy Robinson, it appears that the os.popen module or the win32pipe
module may be of use. Here are 2 examples from the book:
import os
file = os .popen ('echo Hello from Python')
file .read()
... 'Hello from Python'
import win32pipe
file = win32pipe. popen ('echo Hello from Python')
file .read()
... 'Hello from Python\012'
According to the book, os.popen does not work correctly within a GUI
application while win32pipe.popen does.
Hope this helps.