How can I get dos program running info in python?
Oleg Broytmann
phd at phd.pp.ru
Tue Jan 8 11:09:41 EST 2002
On Tue, Jan 08, 2002 at 11:53:40PM +0800, Kick wrote:
> I want to use python to make a wrapper for my bcc command line complier. I
> wish I can gather information which bcc return and show them in the python
> program.
bcc is command-line program that prints its output to stdout. You can
easily capture the output with a pipe:
import os
pipe = os.popen("bcc...param1...param2...", 'r')
all_lines = pipe.read()
process(all_lines)
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list