Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11097 > unrolled thread

RE: subprocess.Popen and thread module

Started by"Danny Wong (dannwong)" <dannwong@cisco.com>
First post2011-08-10 01:48 -0500
Last post2011-08-10 01:48 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: subprocess.Popen and thread module "Danny Wong (dannwong)" <dannwong@cisco.com> - 2011-08-10 01:48 -0500

#11097 — RE: subprocess.Popen and thread module

From"Danny Wong (dannwong)" <dannwong@cisco.com>
Date2011-08-10 01:48 -0500
SubjectRE: subprocess.Popen and thread module
Message-ID<mailman.2088.1312958991.1164.python-list@python.org>
Hi Chris,
Here is the code,
    try:
        cmd_output = subprocess.Popen(['scm', 'load', '--force', '-r', nickname, '-d', directory, project], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        status = cmd_output.wait()
        print "In load status is: %s" % status + "\n"
    except:
        print "Error Executing %s" % command + "\n"


-----Original Message-----
From: chris@rebertia.com [mailto:chris@rebertia.com] On Behalf Of Chris Rebert
Sent: Tuesday, August 09, 2011 11:47 PM
To: Danny Wong (dannwong)
Cc: python-list@python.org
Subject: Re: subprocess.Popen and thread module

On Tue, Aug 9, 2011 at 11:38 PM, Danny Wong (dannwong)
<dannwong@cisco.com> wrote:
> Hi All,
>   I'm trying to execute some external commands from multiple database.
> I'm using threads and subprocess.Popen ( from docs, all the popen*
> functions are deprecated and I was told to use subprocess.Popen) to
> execute the external commands in parallel, but the commands seems to
> hang.

What's your Popen() call look like?

Cheers,
Chris

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web