Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #11097
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <dannwong@cisco.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:module': 0.04; '%s"': 0.09; 'danny': 0.09; 'deprecated': 0.09; 'message-----': 0.12; "'-r',": 0.16; 'docs,': 0.16; 'email name:chris': 0.16; 'except:': 0.16; 'like?': 0.16; 'parallel,': 0.16; 'cc:addr :python-list': 0.16; 'wrote:': 0.16; 'cheers,': 0.18; 'subject:skip:s 10': 0.18; 'cc:no real name:2**0': 0.20; 'seems': 0.20; 'trying': 0.21; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'tue,': 0.23; 'pm,': 0.24; 'command': 0.24; 'aug': 0.24; 'load': 0.26; "i'm": 0.27; 'code,': 0.28; 'all,': 0.28; 'print': 0.29; 'cc:addr:python.org': 0.30; 'module': 0.30; '"in': 0.30; 'threads': 0.30; 'cc:': 0.31; 'chris': 0.32; 'subject:': 0.32; "what's": 0.33; 'sent:': 0.33; 'try:': 0.34; 'external': 0.35; 'executing': 0.37; 'thread': 0.37; 'using': 0.37; 'but': 0.37; 'from:': 0.38; 'some': 0.38; 'subject:: ': 0.39; 'skip:- 10': 0.39; 'your': 0.61; 'here': 0.65; 'august': 0.70; 'database.': 0.74; '11:47': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=dannwong@cisco.com; l=1458; q=dns/txt; s=iport; t=1312958990; x=1314168590; h=mime-version:content-transfer-encoding:subject:date: message-id:in-reply-to:references:from:to:cc; bh=H5E8mHdTxIO0MtNQlL2Wdgq+OFwKJTzk3A4lQl0EGtA=; b=W3GKYgPhPRlwEote+6NKsuFYeC1TSIzYeNpbcU56OaIZPZ5dRuzabjpI 4yQkgef0mSkjApG920TPlrs4JTrYmKUCMxikBNMP4kwsBVHlZXnAiE1RB MuarUdodo5VZvlZSboIQmzbjdROzM7XxjwgGUcwtzP7aPogK/+eMEaYdI k=; |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | AuIAAIsoQk6tJXG9/2dsb2JhbABBhEeTH451a3eBQAEBAQEDEgEQDQRFDAQCAQgOAwQBAQECAgYGFwECAgIBAUQJCAEBBBMIGqchAY0rkRiBLIQKMV8Eh12QP4t4 |
| X-IronPort-AV | E=Sophos;i="4.67,349,1309737600"; d="scan'208";a="11630145" |
| X-MimeOLE | Produced By Microsoft Exchange V6.5 |
| Content-class | urn:content-classes:message |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | base64 |
| Subject | RE: subprocess.Popen and thread module |
| Date | Wed, 10 Aug 2011 01:48:36 -0500 |
| In-Reply-To | <CAMZYqRSxAzLaea6aR0DNDnc-Jv3XWSPvo6cZdv4D0hcL5eeKTg@mail.gmail.com> |
| X-MS-Has-Attach | |
| X-MS-TNEF-Correlator | |
| Thread-Topic | subprocess.Popen and thread module |
| Thread-Index | AcxXKVFvAmqQUDF/QJq0vySHw+qOLwAABbkg |
| References | <20110808013500.7c9e30ff44caee0f0bbf988a@johnohagan.com><D59C59453D0EDC43832490B6DADFAECF0432A191@XMB-RCD-214.cisco.com> <CAMZYqRSxAzLaea6aR0DNDnc-Jv3XWSPvo6cZdv4D0hcL5eeKTg@mail.gmail.com> |
| From | "Danny Wong (dannwong)" <dannwong@cisco.com> |
| To | "Chris Rebert" <clp2@rebertia.com> |
| X-OriginalArrivalTime | 10 Aug 2011 06:48:38.0273 (UTC) FILETIME=[88870F10:01CC5729] |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2088.1312958991.1164.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1312958991 news.xs4all.nl 23975 [2001:888:2000:d::a6]:47983 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:11097 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
RE: subprocess.Popen and thread module "Danny Wong (dannwong)" <dannwong@cisco.com> - 2011-08-10 01:48 -0500
csiph-web