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


Groups > comp.lang.python > #12027

Re: To cmd.exe

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'function:': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'subprocess': 0.09; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'convenience': 0.23; 'module,': 0.23; 'cc:addr:python.org': 0.30; 'tjg': 0.30; 'url:library': 0.31; 'header:User-Agent:1': 0.34; 'url:python': 0.36; 'especially': 0.37; 'url:org': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'url:docs': 0.39; 'from:addr:mail': 0.64; 'to:none': 0.93
Date Mon, 22 Aug 2011 14:29:33 +0100
From Tim Golden <mail@timgolden.me.uk>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version 1.0
CC python-list@python.org
Subject Re: To cmd.exe
References <CAN_CDaMm_mgxVhcoGaGVaRyMMRG3fJPqbwOkZ0MDsWKRPtwjuQ@mail.gmail.com>
In-Reply-To <CAN_CDaMm_mgxVhcoGaGVaRyMMRG3fJPqbwOkZ0MDsWKRPtwjuQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
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.316.1314019782.27778.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1314019782 news.xs4all.nl 23904 [2001:888:2000:d::a6]:39066
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12027

Show key headers only | View raw


On 22/08/2011 14:21, aba ca wrote:
> How can I send to cmd.exe "netstat -an"?

Look at the subprocess module, and especially the .check_output
convenience function:

   http://docs.python.org/library/subprocess.html#subprocess.check_output

TJG

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


Thread

Re: To cmd.exe Tim Golden <mail@timgolden.me.uk> - 2011-08-22 14:29 +0100

csiph-web