Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:python': 0.11; 'to:name:python-list': 0.15; '>>>': 0.18; 'import': 0.21; '>>>': 0.22; 'message-id:@mail.gmail.com': 0.27; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'skip:o 20': 0.38; 'to:addr:python.org': 0.39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=y5XgK137iQyapjVxjcczhh8QXsyK8/8SWMAyBLFqnqQ=; b=NcqQCtJTCPB2X2FTMZ+hLniHfpCewPbS2WI3GcTqS0L5gncc23lE6tHtBTpLV4iDMz wxCAHiGoYe7LwLCyoNzZaiPqSfoIOCEg5IpNwCMbLJAKKZP3V8Wuqb6Wh4JedMHT3RHV lCGSfEcs3sQXVmrwfow00X+VVSvhey95sY4Mmek0++cRUcm4fLR2upI4ElcIioi89SJK fqqIimM45xwIDnklApfwD81lIKk6mm6vI8kCW4VsDHX30PqGv6krhoG8Y3hKMwYPfwRI bzSArYU/IDJ6lmmGQbIGNt4UHaIT2gkLlpHfVyyveuLOXEiXkpyWv84ImNi6xCpRWUTc 83DQ== MIME-Version: 1.0 X-Received: by 10.50.6.230 with SMTP id e6mr943240iga.3.1360646018836; Mon, 11 Feb 2013 21:13:38 -0800 (PST) Date: Tue, 12 Feb 2013 13:13:38 +0800 Subject: call shell from python From: contro opinion To: python-list Content-Type: multipart/alternative; boundary=e89a8f646b359e280904d58016ed 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360646021 news.xs4all.nl 6924 [2001:888:2000:d::a6]:46935 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38727 --e89a8f646b359e280904d58016ed Content-Type: text/plain; charset=ISO-8859-1 >>> import os >>> os.system("i=3") 0 >>> os.system("echo $i") 0 how can i get the value of i? --e89a8f646b359e280904d58016ed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
>>> import os
>>> os.syst= em("i=3D3")
0
>>> os.system("ec= ho $i")

0
how can i get the value o= f =A0i? =A0
--e89a8f646b359e280904d58016ed--