how to call shell?
timr at probo.com
Tue Feb 12 06:43:38 CET 2013
contro opinion <contropinion at gmail.com> wrote:
>>>> import os
>>>> os.system("echo $i")
>why i can't get the value of i ?
Each invocation of os.system creates a brand new shell that starts, runs,
and terminates. Your first command adds a variable "i" to the environment
for that shell, but the variable is deleted when the shell procsess
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list