contro opinion <contropin...@gmail.com> wrote: > >>>> import os >>>> os.system("i=3") >0 >>>> os.system("echo $i") > >0 >>>> >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 terminates. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list