get output of cmd-line command under MS windows

calmar mac at calmar.ws
Tue Feb 14 05:37:32 EST 2006


On 2006-02-08, Bernard Lebel <3dbernard at gmail.com> wrote:

Hi Bernhard,

> You should give a go to os.popen( <system command here> ). Article
> 6.1.2 and 6.1.3 in the Python Library doc.
>

that was good, but on python2.4

subprocess is GREAT! e.g.:

    pipe = subprocess.Popen(tot, stdout=subprocess.PIPE,\
            stderr=subprocess.PIPE, shell=False)
    message = pipe.stdout.read()
    error = pipe.stderr.read()

thanks all,
calmar

-- 
  calmar

          (o_  It rocks: LINUX + Command-Line-Interface
          //\
          V_/_                     http://www.calmar.ws



More information about the Python-list mailing list