thank you very much Chris :)<br><br><div class="gmail_quote">On Wed, Dec 2, 2009 at 12:10 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> On Wed, Dec 2, 2009 at 11:42 AM, Chris Rebert <<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>> wrote:<br>
>> On Tue, Dec 1, 2009 at 10:05 PM, M Kumar <<a href="mailto:tomanishkb@gmail.com">tomanishkb@gmail.com</a>> wrote:<br>
>> > Is there any python module for windows which is equivalent to commands<br>
>> > module in linux?<br>
>><br>
>> `subprocess` should work: <a href="http://docs.python.org/library/subprocess.html" target="_blank">http://docs.python.org/library/subprocess.html</a><br>
>><br>
>> The `commands` docs even say:<br>
>> "The subprocess module provides more powerful facilities for spawning<br>
>> new processes and retrieving their results.<br>
>> Using the subprocess module is preferable to using the commands module."<br>
<br>
</div><div class="im">On Tue, Dec 1, 2009 at 10:34 PM, M Kumar <<a href="mailto:tomanishkb@gmail.com">tomanishkb@gmail.com</a>> wrote:<br>
> can I use this module to store output to a python variable?<br>
> I am looking for something similar to<br>
> commands.getoutput("<cmd>")<br>
<br>
</div>Yes, of course it can. If it's more powerful, then it can do<br>
everything the other module can.<br>
It'd be silly for the `commands` docs to point people to `subprocess`<br>
if this wasn't the case.<br>
It will take more than a single line of code though. Read the module's docs.<br>
<br>
Regards,<br>
<div><div></div><div class="h5">Chris<br>
--<br>
<a href="http://blog.rebertia.com" target="_blank">http://blog.rebertia.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>thanks & regards,<br><br>Maneesh KB<br>Sent from Delhi, DL, India