Re: how to get output.

2007-08-09 Thread Indu Shreenath
Hey, I did write the following: but it does not work. import subprocess as sp try: = sp.Popen("DIR . /AD /B", stdout=sp.PIPE) result = p.communicate()[0] print result except: print "error" This throws error. DIR . /AD /B will list out only

Re: how to get output.

2007-08-09 Thread Indu Shreenath
Hey, I did write the following, but it does not work. import subprocess as sp try: = sp.Popen("DIR . /AD /B", stdout=sp.PIPE) result = p.communicate()[0] print result except: print "error" This throws error. DIR . /AD /B will list out only dir

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