Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:python': 0.11; 'wrote:': 0.17; '>>>': 0.18; 'module': 0.19; 'import': 0.21; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'url:wiki': 0.26; 'received:google.com': 0.34; 'received:209.85': 0.35; 'url:org': 0.36; '12,': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'from:no real name:2**0': 0.60; '2013': 0.84 X-Received: by 10.182.16.35 with SMTP id c3mr18854obd.31.1360665005327; Tue, 12 Feb 2013 02:30:05 -0800 (PST) Newsgroups: comp.lang.python Date: Tue, 12 Feb 2013 02:30:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.95.99.166; posting-account=cNblhAoAAABtj4WViIIQ8rzyOr1BtPbL References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 77.95.99.166 MIME-Version: 1.0 Subject: Re: call shell from python From: spilcm@hotmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list 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: , Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360665008 news.xs4all.nl 6929 [2001:888:2000:d::a6]:38651 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38739 On Tuesday, February 12, 2013 6:13:38 AM UTC+1, contro opinion wrote: > >>> import os > >>> os.system("i=3D3") > 0 > >>> os.system("echo $i") >=20 >=20 > 0 > how can i get the value of =A0i? You may want to take a look at the pexcpect module : http://www.noah.org/wi= ki/pexpect