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


Groups > comp.lang.python > #11515

subprocess.Popen question

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.020
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'command.': 0.09; 'output': 0.10; 'ideas?': 0.16; 'subject:question': 0.18; 'subject:skip:s 10': 0.18; '(which': 0.19; 'header:In-Reply-To:1': 0.22; 'command': 0.24; 'variable': 0.24; 'code': 0.25; 'thanks.': 0.26; "i'm": 0.27; 'all,': 0.28; 'capture': 0.32; 'to:addr:python-list': 0.33; 'charset:us-ascii': 0.36; 'file': 0.36; 'executing': 0.37; 'but': 0.37; 'to:addr:python.org': 0.39
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=dannwong@cisco.com; l=368; q=dns/txt; s=iport; t=1313478247; x=1314687847; h=mime-version:content-transfer-encoding:subject:date: message-id:in-reply-to:references:from:to; bh=DszIyebd31pXWe1tnAl8yJ20bmzN7yMbRnjIrk13Yuk=; b=SriNUaiXYe0DoPYUADuaFlzbFzEhc0V3/tyYwevdT+PbYYtuMo9EI+ht ZccDna8N3PmVUZRhRzCEsJGZPQ8eGhGgqaNmvnDn6VNpBb/N/OgMWfAjG oiKGfNak06rflsOQQ+Q3vF3FaXN52G5BiTM2VZS9dktiTGoGBfQhcpkRt E=;
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result AkwHAFQVSk6tJV2d/2dsb2JhbABBmRKPCneBQQEBAQMSAR0KTwIBKgYYBgFWAQEEGxqjJQGfFIVoXwSHX5BIi34
X-IronPort-AV E=Sophos;i="4.67,378,1309737600"; d="scan'208";a="13455078"
X-MimeOLE Produced By Microsoft Exchange V6.5
Content-class urn:content-classes:message
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
Subject subprocess.Popen question
Date Tue, 16 Aug 2011 02:03:50 -0500
In-Reply-To <4E49AB3E.9000801@web.de>
X-MS-Has-Attach
X-MS-TNEF-Correlator
Thread-Topic subprocess.Popen question
Thread-Index Acxb4qaVd18dDdypRyWw5bRCKOpK/w==
References <4E49AB3E.9000801@web.de>
From "Danny Wong (dannwong)" <dannwong@cisco.com>
To <python-list@python.org>
X-OriginalArrivalTime 16 Aug 2011 07:03:58.0488 (UTC) FILETIME=[AB7F3980:01CC5BE2]
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.39.1313478249.27778.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1313478249 news.xs4all.nl 23898 [2001:888:2000:d::a6]:59062
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:11515

Show key headers only | View raw


Hi All,
	I'm executing a command which I want to capture the
standard/stderr output into a file (which I have with the code below),
but I also want the standard output to go into a variable so I can
process the information for the next command. Any ideas? Thanks.

CMD_OUTPUT = subprocess.Popen(COMMAND, stdout=PROJECT_LOGFILE,
stderr=subprocess.STDOUT)

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

subprocess.Popen question "Danny Wong (dannwong)" <dannwong@cisco.com> - 2011-08-16 02:03 -0500
  Re: subprocess.Popen question Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-08-16 11:10 +0200
  Re: subprocess.Popen question Nobody <nobody@nowhere.com> - 2011-08-16 12:26 +0100

csiph-web