Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53266
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <tim@akwebsoft.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'output': 0.05; 'subject:skip:s 10': 0.07; 'subject:instance': 0.09; 'terminated': 0.09; 'works.': 0.09; 'python': 0.11; 'def': 0.12; 'errmsg': 0.16; 'forty': 0.16; 'appears': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; "i'm": 0.30; 'skip:_ 10': 0.34; 'johnson': 0.35; 'skip:s 60': 0.36; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'break': 0.61; 'content- disposition:inline': 0.62; 'managing': 0.66; '2.7.1': 0.84 |
| Date | Thu, 29 Aug 2013 17:00:21 -0800 |
| From | Tim Johnson <tim@akwebsoft.com> |
| To | Python ML <python-list@python.org> |
| Subject | Re: subprocess.Popen instance hangs |
| Mail-Followup-To | Python ML <python-list@python.org> |
| References | <20130829183418.GE414@mail.akwebsoft.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| In-Reply-To | <20130829183418.GE414@mail.akwebsoft.com> |
| User-Agent | Mutt/1.4.2.3i |
| Organization | AkWebsoft |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.377.1377824422.19984.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1377824422 news.xs4all.nl 15893 [2001:888:2000:d::a6]:53247 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:53266 |
Show key headers only | View raw
* Tim Johnson <tim@akwebsoft.com> [130829 10:51]:
> using Python 2.7.1 on OS X 10.7.5
>
> I'm managing a process of drush using an instance of subprocess.Popen
<...>
## This appears to be what works.
def __exec(self,args) :
"""Run the process with arguments"""
p = subprocess.Popen(args,stderr=subprocess.PIPE,stdout=subprocess.PIPE)
while 1 :
output = p.stdout.read()
if output :
print(output)
else : break
errmsg = p.communicate()[1]
if errmsg :
self.__err('Process terminated with error:',errmsg)
## Thanks again, gnarly one for me. I am eternally a noob!
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: subprocess.Popen instance hangs Tim Johnson <tim@akwebsoft.com> - 2013-08-29 17:00 -0800
Re: subprocess.Popen instance hangs Nobody <nobody@nowhere.com> - 2013-08-30 15:47 +0100
Re: subprocess.Popen instance hangs Tim Johnson <tim@akwebsoft.com> - 2013-08-30 07:32 -0800
Re: subprocess.Popen instance hangs Jerry Hill <malaclypse2@gmail.com> - 2013-08-30 11:38 -0400
Re: subprocess.Popen instance hangs Tim Johnson <tim@akwebsoft.com> - 2013-08-30 10:43 -0800
csiph-web