Re: How to pass the shell in Python

2010-07-20 Thread Jia Hu
sub = subprocess.Popen("shell command", shell=True) If you have to wait the shell finishes its commands and then continue the next Python code. You can add another line: sub.wait() On Tue, Jul 20, 2010 at 7:57 AM, S.Selvam wrote: > > > On Tue, Jul 20, 2010 at 7:11 AM, Ranjith Kumar wrote: > >>

Re: How to pass the shell in Python

2010-07-20 Thread S.Selvam
On Tue, Jul 20, 2010 at 7:11 AM, Ranjith Kumar wrote: > Hi Folks, > Can anyone tell me how to run shell commands using python script. > > For simple work, i generally use os.system call. -- Regards, S.Selvam " I am because we are " -- http://mail.python.org/mailman/listinfo/python-li

Re: How to pass the shell in Python

2010-07-19 Thread MRAB
Ranjith Kumar wrote: Hi Folks, Can anyone tell me how to run shell commands using python script. Use the 'subprocess' module. -- http://mail.python.org/mailman/listinfo/python-list