[Python-bugs-list] [ python-Bugs-548661 ] os.popen w/o using the shell

noreply@sourceforge.net noreply@sourceforge.net
Thu, 25 Apr 2002 11:13:00 -0700


Bugs item #548661, was opened at 2002-04-25 17:30
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=548661&group_id=5470

Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Ian Bicking (ianbicking)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.popen w/o using the shell

Initial Comment:
I heard that there was an undocumented feature to the
os.popen family, where instead of passing a command
string as the first argument you could pass a list, as
[path, arg1, arg2, ...], and circumvent any shell
interpretation.  I was disapointed to see that this was
not so ("popen() argument 1 must be string, not list"
ditto tuple)

I believe this would be an excellent feature -- using
the shell is a significant source of errors due to
quoting, as well as a serious security concern.  95% of
the time the shell is not required.  The shell also
introduces portability concerns (e.g., bug #512433) --
creating a Python shell is not necessary when the shell
is usually superfluous anyway.



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-25 20:13

Message:
Logged In: YES 
user_id=21627

This feature is indeed available in popen2.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=548661&group_id=5470