A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/025548.html below:

[Python-Dev] popen behavior

[Python-Dev] popen behaviorMartin v. Loewis martin@v.loewis.de
18 Jun 2002 22:44:50 +0200
Kevin Butler <kbutler@campuspipeline.com> writes:

> - Should we maintain the os.popen & popen2.popen dual exposure with
> their different argument & return value orders?

Certainly. Any change to that will break existing applications.

> - Should we maintain the different behavior for lists of arguments vs
> strings? (it does not appear to be documented)
> 
> That is, the command can be either a string or a list of strings.  If
> it is a list of strings, it is executed as a new process without a
> shell. If it is a string, CPython's popen2 module attempts to execute
> it as a shell command-line as follows:
>          if isinstance(cmd, types.StringTypes):
>              cmd = ['/bin/sh', '-c', cmd]

If you propose to extend argument processing for one of the functions
so that passing the additional arguments in current releases produces
an exception - then adding this extension would be desirable if that
adds consistency.

Regards,
Martin





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4