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


Groups > comp.lang.python > #38738

Re: call shell from python

Newsgroups comp.lang.python
Date 2013-02-12 02:30 -0800
References <mailman.1684.1360646021.2939.python-list@python.org>
Message-ID <5e53dd40-80f9-4632-b150-2b302a97201b@googlegroups.com> (permalink)
Subject Re: call shell from python
From spilcm@hotmail.com

Show all headers | View raw


On Tuesday, February 12, 2013 6:13:38 AM UTC+1, contro opinion wrote:
> >>> import os
> >>> os.system("i=3")
> 0
> >>> os.system("echo $i")
> 
> 
> 0
> how can i get the value of  i?

You may want to take a look at the pexcpect module : http://www.noah.org/wiki/pexpect

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


Thread

call shell from python contro opinion <contropinion@gmail.com> - 2013-02-12 13:13 +0800
  Re: call shell from python spilcm@hotmail.com - 2013-02-12 02:30 -0800
  Re: call shell from python spilcm@hotmail.com - 2013-02-12 02:30 -0800

csiph-web