Re: how to get command output using python

2007-08-09 Thread Arnau Sanchez
[EMAIL PROTECTED] escribió: >> Any non cross-platform module should be avoided unless absolutely necessary. >> >> Subprocess is the right module to use. >> >> arnau > > You forgot to mention that subprocess replaces commands, so in effect, > commands is deprecated anyway. It was implicit :-) An

Re: how to get command output using python

2007-08-09 Thread kyosohma
On Aug 9, 12:01 pm, Arnau Sanchez <[EMAIL PROTECTED]> wrote: > Steven Harms escribió: > > > In python it is quite easy: > > > import commands > > status, output = commands.getstatusoutput("my command") > > Uhm, this module has a big issue: > > (http://docs.python.org/lib/module-commands.html) > ---

Re: how to get command output using python

2007-08-09 Thread Arnau Sanchez
Steven Harms escribió: > In python it is quite easy: > > import commands > status, output = commands.getstatusoutput("my command") Uhm, this module has a big issue: (http://docs.python.org/lib/module-commands.html) 8.17 commands -- Utilities for running commands Availability: Unix.

Re: how to get command output using python

2007-08-09 Thread Steven Harms
In python it is quite easy: import commands status, output = commands.getstatusoutput("my command") status will be the return code of the command output will be what the command displayed -sjh -- http://mail.python.org/mailman/listinfo/python-list

how to get command output using python

2007-08-09 Thread Indu Shreenath
Hey, I want to get the output of DIR /AD /B to a variable using python. How to do this? Thanks, Indu - Download prohibited? No problem. CHAT from any browser, without download.-- http://mail.python.org/mailman/listinfo/python-list