Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38727 > unrolled thread
| Started by | contro opinion <contropinion@gmail.com> |
|---|---|
| First post | 2013-02-12 13:13 +0800 |
| Last post | 2013-02-12 02:30 -0800 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | contro opinion <contropinion@gmail.com> |
|---|---|
| Date | 2013-02-12 13:13 +0800 |
| Subject | call shell from python |
| Message-ID | <mailman.1684.1360646021.2939.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
>>> import os
>>> os.system("i=3")
0
>>> os.system("echo $i")
0
how can i get the value of i?
[toc] | [next] | [standalone]
| From | spilcm@hotmail.com |
|---|---|
| Date | 2013-02-12 02:30 -0800 |
| Message-ID | <5e53dd40-80f9-4632-b150-2b302a97201b@googlegroups.com> |
| In reply to | #38727 |
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
[toc] | [prev] | [next] | [standalone]
| From | spilcm@hotmail.com |
|---|---|
| Date | 2013-02-12 02:30 -0800 |
| Message-ID | <mailman.1695.1360665008.2939.python-list@python.org> |
| In reply to | #38727 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web