how to get output.

Diez B. Roggisch deets at nospam.web.de
Thu Aug 9 02:46:07 EDT 2007


indu_shreenath schrieb:
> Hey,
> I want to get the output of "DIR /AD /B" command to a varriable using 
> python. How can I do this?

Using the subprocess-module.


However, I'm not sure what DIR /AD /B does - but there are many 
functions in module os that might deliver what you want without invoking 
an external command.

Diez



More information about the Python-list mailing list