[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Use subprocess.Popen for executing commands in cmdline tests

From: Eric Hanchrow <offby1_at_blarg.net>
Date: Tue, 08 Apr 2008 06:06:02 -0700

>>>>> "jeremy" == jeremy hinds <jeremy.hinds_at_gmail.com> writes:

    jeremy> I could have sworn that I saw at least one instance of a
    jeremy> pipeline being executed through this, but I'm not having
    jeremy> any luck finding it now.

If you are simply referring to an example of how to create your own
pipeline with subprocess.Popen (as opposed to using the shell to do
it), here's the relevant example from the documentation:

    17.1.3.2 Replacing shell pipe line

    output=`dmesg | grep hda`
    ==>
    p1 = Popen(["dmesg"], stdout=PIPE)
    p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
    output = p2.communicate()[0]

-- 
I'd like to see Rush Limbaugh tell Omar he can't get
married.
        --Alex Kotlowitz.  You hadda be there
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-08 15:10:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.