How to pass the shell in Python
Jia Hu
hujia06 at gmail.com
Tue Jul 20 13:28:41 EDT 2010
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 <s.selvamsiva at gmail.com> wrote:
>
>
> On Tue, Jul 20, 2010 at 7:11 AM, Ranjith Kumar <ranjithtenz at gmail.com>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-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100720/34ab5197/attachment-0001.html>
More information about the Python-list
mailing list