Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73886
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <wolfgang.maier@biologie.uni-freiburg.de> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Windows': 0.02; 'interpreter': 0.05; 'output': 0.05; 'remaining': 0.07; 'exit': 0.09; 'exits': 0.09; 'explanation': 0.09; 'python': 0.11; 'doing:': 0.16; 'finishes': 0.16; 'hmm.': 0.16; 'idle,': 0.16; 'observations': 0.16; 'reedy': 0.16; 'sees': 0.16; 'status.': 0.16; 'stderr': 0.16; 'stdout': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'slightly': 0.19; 'starts': 0.20; 'thanks.': 0.20; 'command': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'sends': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'tried': 0.27; 'am,': 0.29; "doesn't": 0.30; 'lines': 0.31; 'pipe': 0.31; 'received:132': 0.31; 'regular': 0.32; 'run': 0.32; 'running': 0.33; 'are:': 0.33; 'guess': 0.33; 'message.': 0.35; 'subject:with': 0.35; 'skip:s 30': 0.35; 'but': 0.35; 'add': 0.35; 'earth': 0.36; 'idle': 0.36; 'wishes,': 0.36; 'subject:?': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'eventually': 0.60; 'header:Return- path:1': 0.60; "you're": 0.61; 'hang': 0.67; '*and*': 0.84; 'gone.': 0.84; 'partial': 0.84 |
| Delivery-date | Thu, 03 Jul 2014 10:33:21 +0200 |
| Date | Thu, 03 Jul 2014 10:03:07 +0200 |
| From | Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| MIME-Version | 1.0 |
| To | Terry Reedy <tjreedy@udel.edu>, python-list@python.org |
| Subject | Re: Success with subprocess communicate on Windows? |
| References | <mailman.11386.1404248789.18130.python-list@python.org> <iq27r9p1gg7nampcd6rr0pftrshinm9oog@4ax.com> <lp0i1p$3gn$1@ger.gmane.org> <loom.20140703T005928-903@post.gmane.org> <lp2l1n$et6$1@ger.gmane.org> |
| In-Reply-To | <lp2l1n$et6$1@ger.gmane.org> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| 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 | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11445.1404376403.18130.python-list@python.org> (permalink) |
| Lines | 44 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1404376403 news.xs4all.nl 2935 [2001:888:2000:d::a6]:40867 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:73886 |
Show key headers only | View raw
On 07/03/2014 06:09 AM, Terry Reedy wrote: > > Yes, but what puzzled me is that running > subprocess.check_output(r'pyflakes c:\programs\python34\lib') > in the regular interpreter *does* produce output instead of the error > message. My guess is that it fills up the pipe, so that check_output > starts reading the pipe long before pyflakes exits with status 1. > > Hmm. I tried it again, and I see some but not all of the output I got at > the command line *and* I see the exit status message. So the subprocess > must get some of the output but then stop when it sees the exit status. > Thanks. > For a partial explanation try this: from the command line (again my path is slightly different): pyflakes C:\Python34\lib > stdout.txt this will still give you a few lines of output and these should be the same ones you're seeing from the python interpreter when you're doing: subprocess.check_output(r'pyflakes C:\Python34\lib') ==> pyflakes sends these lines to stderr instead of stdout !! confirmation: subprocess.check_output(r'pyflakes C:\Python34\lib', stderr=subprocess.PIPE) and the output is gone. So the remaining questions are: - why on earth is pyflakes sending these lines (and only these) to stderr ? - what is happening to the stderr output when run in IDLE ? I guess it is caught and suppressed somewhere, but to add to your observations the check_output call doesn't hang on IDLE, but finishes eventually with no output other than the traceback. Best wishes, Wolfgang
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Success with subprocess communicate on Windows? Terry Reedy <tjreedy@udel.edu> - 2014-07-01 17:05 -0400
Re: Success with subprocess communicate on Windows? Tim Roberts <timr@probo.com> - 2014-07-01 21:33 -0700
Re: Success with subprocess communicate on Windows? Terry Reedy <tjreedy@udel.edu> - 2014-07-02 05:05 -0400
Re: Success with subprocess communicate on Windows? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-02 19:31 +0200
Re: Success with subprocess communicate on Windows? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-02 19:37 +0200
Re: Success with subprocess communicate on Windows? Terry Reedy <tjreedy@udel.edu> - 2014-07-02 19:14 -0400
Re: Success with subprocess communicate on Windows? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-02 23:22 +0000
Re: Success with subprocess communicate on Windows? Ethan Furman <ethan@stoneleaf.us> - 2014-07-02 16:54 -0700
Re: Success with subprocess communicate on Windows? Terry Reedy <tjreedy@udel.edu> - 2014-07-03 00:09 -0400
Re: Success with subprocess communicate on Windows? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-03 10:03 +0200
Re: Success with subprocess communicate on Windows? Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-03 11:22 +0200
csiph-web