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
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
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