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/2007-March/072301.html below:

[Python-Dev] deprecate commands.getstatus()

[Python-Dev] deprecate commands.getstatus() [Python-Dev] deprecate commands.getstatus()Mike Klaas mike.klaas at gmail.com
Fri Mar 23 03:38:38 CET 2007
On 3/22/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Titus Brown wrote:
>
> > I could add in a 'system'-alike call easily enough; that was suggested.
> > But I think
> >
> >       returncode = subprocess.call("program")
> >
> > is pretty simple, isn't it?
>
> Something to keep in mind is that system() doesn't
> directly launch a process running the command, it
> uses a shell. So it's not just simple sugar for
> some subprocess.* call.

>>> subprocess.call("ls | grep tmp", shell=True)
svn-commit.2.tmp
svn-commit.tmp

The more important difference is the encoding of the return value:
system() has magic to encode signal-related termination of the child
process.

-Mike
More information about the Python-Dev mailing list

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