Ret status technique popen, popen2 (NT)

Neil Hodgson neilh at scintilla.org
Sat Jun 17 06:16:13 EDT 2000


> Thanks, I'm on W95a for the weekend so have given it a try on that
> with mixed results. The zop test script works well but I haven't
> manged to get output from anything else ("dir") as the pipe appears to
> close immediately. e.g.

   The dir command is part of the command processor rather than an external
executable so has to be run like this on NT:
p=piper.PipedCommand("cmd /c dir")
    or on 95
p=piper.PipedCommand("c:\\command.com /c dir")
   although the current command processor should be found from the
environment variable COMSPEC instead of hard coding it.

   You could run all commands with the additional layer of the command
processor if you want. I didn't in piper as there is a bit of overhead to
doing this.

> >>> p=piper.PipedCommand("c:\\utils\where lha.exe")
    Try adding the command processor in here. Is "where" a batch file?

    Neil






More information about the Python-list mailing list