<div>sub = subprocess.Popen("shell command", shell=True)</div>
<div> </div>
<div>If you have to wait the shell finishes its commands and then continue the next Python code. You can add another line:</div>
<div> sub.wait()<br><br></div>
<div class="gmail_quote">On Tue, Jul 20, 2010 at 7:57 AM, S.Selvam <span dir="ltr"><<a href="mailto:s.selvamsiva@gmail.com">s.selvamsiva@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im"><br><br>
<div class="gmail_quote">On Tue, Jul 20, 2010 at 7:11 AM, Ranjith Kumar <span dir="ltr"><<a href="mailto:ranjithtenz@gmail.com" target="_blank">ranjithtenz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi Folks,
<div> Can anyone tell me how to run shell commands using python script. <br></div></blockquote>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div> <br></div></blockquote></div><br></div>For simple work, i generally use os.system call.<br clear="all"><font color="#888888"><br>-- <br>Regards,<br>S.Selvam<br><br> " I am because we are "<br></font><br>
--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br><br></blockquote></div><br>