Avoiding shell metacharacters in os.popen

Michael Hudson mwh at python.net
Thu Sep 30 09:51:07 EDT 2004


Nick Craig-Wood <nick at craig-wood.com> writes:

> Michael Hoffman <m.h.3.9.1.without.dots.at.cam.ac.uk at example.com> wrote:
> >  Nick Craig-Wood wrote:
> > 
> > > As I pointed out in my post there isn't an equivalent for
> > > os.popen* which doesn't go via the shell (except for undocumented
> > > os.popen2).
> > 
> >  Is it the undocumented nature of it that is unnerving you?
> 
> Yes!  If it was documented then it would have to be made to work on
> Windows too I gues.

I think this might be part of the reason it's underdocumented.  I also
have a sneaking suspicion it's impossible on windows, but don't really
know...

Cheers,
mwh

-- 
  > Why are we talking about bricks and concrete in a lisp newsgroup?
  After long experiment it was found preferable to talking about why
  Lisp is slower than C++...
                        -- Duane Rettig & Tim Bradshaw, comp.lang.lisp



More information about the Python-list mailing list