[Python-Dev] test_popen broken on Win2K

Michael Hudson mwh@python.net
Tue, 11 Mar 2003 10:29:45 +0000

Tim Peters <tim.one@comcast.net> writes:

> [Greg Ewing]
>> What we need is a function which does all those things,
>> but uses some way of specifying them *other* than shell
>> metacharacters. E.g.
>>   os.plumb(("sed", "-e", "s/dead/resting/", "parrots"),
>>     ("grep", "norwegian"), output = myfile))
> [Jeff Epler]
>> +1 on the concept.  +1 on something that can be transformed to use tcl's
>> "exec" so that it'll begin working on several common arches immediately.
> They're really the same thing -- Tcl's exec would be a simple transformation
> of a cross-platform sh-like syntax into Greg's hypothesized functions.

I think Jeff was suggesting that we implement it like this:

def plumb(cmd):
    import Tkinter
    return Tkinter.call('exec ' + cmd)

or whatever.


  at any rate, I'm satisfied that not only do they know which end of
  the pointy thing to hold, but where to poke it for maximum effect.
                                  -- Eric The Read, asr, on google.com