Another way:
>>> import popen2
>>> exec_cmd = popen2.popen4('dir')
>>> output = exec_cmd[0].read()
>>> print output
[...]
04/02/2006 21.44 106 setup.py
06/02/2006 23.25 656 time_synch.py
07/02/2006 00.52 16.885 knockd.log
07/02/2006 00.35 6.376 conf.pyc
[...]-- http://mail.python.org/mailman/listinfo/python-list
