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


Groups > comp.lang.python > #33305

Re: Subprocess puzzle and two questions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'interpreter': 0.04; 'formatting': 0.07; 'subject:two': 0.07; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; "system's": 0.09; 'zero.': 0.09; 'detects': 0.16; 'pythonic': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:questions': 0.16; 'trying': 0.21; 'connected': 0.24; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; "i'm": 0.29; 'could': 0.32; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'likely': 0.33; 'third': 0.34; 'nov': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'anything': 0.36; 'charset:us- ascii': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'more': 0.63; 'produce.': 0.84; 'recover': 0.84; 'spawned': 0.84; 'dennis': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Subprocess puzzle and two questions
Date Wed, 14 Nov 2012 01:35:27 -0500
Organization > Bestiaria Support Staff <
References <09CE8A6B-19D5-46D6-BF36-F8BC7926A0DD@mac.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-76-253-109-45.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 3.3/32.846
X-No-Archive YES
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.3668.1352874912.27098.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352874912 news.xs4all.nl 6979 [2001:888:2000:d::a6]:37851
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33305

Show key headers only | View raw


On Tue, 13 Nov 2012 22:34:55 -0500, wrw@mac.com declaimed the following
in gmane.comp.python.general:

> However, if I try the same operation in the python interpreter using subprocess.Popen like so:

	<snip> 

> I get three digits, BUT that third digit isn't real, the format operation has simply appended a zero.  So:
>
> 1) how can I recover that third digit from the subprocess?
> 2) is there a more pythonic way to do what I'm trying to do?
>
	Python doesn't do anything to the data passed... How could it? It
doesn't know what the spawned program is going to produce.

	What is more likely is that your system's implementation of  "time"
detects that it is NOT connected to a console and IT is changing the
formatting that it outputs.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Re: Subprocess puzzle and two questions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-14 01:35 -0500

csiph-web