Python or 4NT? With a question or two about popen()

Daniel Dittmar daniel.dittmar at sap.corp
Mon Sep 13 10:37:19 CEST 2004

Robin Siebler wrote:
> I have a bunch of command line tests that I need to automate.  I've
> run into too many bugs with the default Win2k command shell, so I need
> to either purchase 4NT or handle the logic and output processing with
> Python.  I'm looking for experiences, comments, problems, etc.

I'm using 4NT as my interactive shell and it's fine. But as soon as a 
script requires something more complex than an IF, I'm doing it in Python.

 > Also, I'm trying to figure out how to use popen().  To say that the
 > documentation and expamples available for this is sparse would be the
 > understatment of the century!  I know that I want to use popen4() but
 > what is the difference between os.popen4(), win32pipe.popen4() and
 > popen2.popen4()(did I miss any?)?

At least in earlier versions of Python, os.popen* didn't worked when the 
script was being called from a service or a GUI program, as such 
programs had no 'console' and therefor no stdin and stdout. 
win32pipe.popen* fixed that.


More information about the Python-list mailing list