Using os.system and os.popen from pythonwin under Windows NT

Randy Trigg trigg at parc.xerox.com
Fri Jun 11 03:12:51 CEST 1999


I'm sure I'm missing some really trivial python/windows thing here.  I
have a .exe executable which runs fine when called in the Command Prompt
window (it doesn't return anything - just writes its results in a file).

But when I attempt to invoke the thing from pythonwin using
os.popen(<command>), I get

  Traceback (innermost last):
    File "<interactive input>", line 0, in ?
  OSError: (0, 'Error')

(I thought the "0" value indicated *no error* which just shows how
confused I've become.)

Meanwhile, if I try invoking the same program using
os.system(<command>), it flashes what looks like it might be a shell
window, and then dies returning error code 1.

Thanks in advance for any ideas,

   - Randy





More information about the Python-list mailing list