Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'output': 0.04; "subject:' ": 0.07; 'subject:extra': 0.09; "'c:\\\\'": 0.16; 'echo': 0.16; 'shell': 0.18; '>>>': 0.18; 'cheers': 0.24; '(which': 0.26; 'wonder': 0.27; 'correct': 0.28; 'skip:_ 10': 0.29; "skip:' 10": 0.30; "skip:' 20": 0.32; 'surely': 0.33; 'to:addr:python-list': 0.33; 'subject:?': 0.35; 'there': 0.35; 'to:addr:python.org': 0.39; 'end': 0.40; 'from:no real name:2**0': 0.60; 'more': 0.63; 'subject:skip:s 20': 0.91 X-EIP: [9x08pgejNnOapr7n8a9hkbPOEBMkJ6y45nt6rDSL9h4=] X-Originating-Email: [sbremal@hotmail.com] From: To: Subject: 'subprocess.check_output' extra new line? Date: Fri, 4 Jan 2013 15:50:58 +0000 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jan 2013 15:50:59.0241 (UTC) FILETIME=[4A5E7990:01CDEA93] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357314726 news.xs4all.nl 6955 [2001:888:2000:d::a6]:38974 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36112 Hi I wonder if the additional new line charachter at the end of the standard o= utput capture is on purpose with 'subprocess.check_output'? >>> subprocess.check_output([ 'cygpath'=2C 'C:\\' ]) '/cygdrive/c\n' If I do the same from the shell there is no extra new line (which is correc= t I believe): $ x=3D$(cygpath C:\\)=3B echo "_${x}_" _/cygdrive/c_ Surely I have a workaround. I was more interested whether it was a design f= law. Cheers B. =