Hi! Let down subprocess, and remember popen4.
Here, an example (with CMD, under w-XP) : import os def lcmd(lst=None): a = os.popen4(lst[0]) for i in lst[1:]: if i!='': a[0].write(i+'\r\n') a[0].flush() return a[1].readlines() l=[ 'CMD /K', 'DIR *.c /B', 'DATE /T', 'TIME /T', 'EXIT' ] lret = lcmd(l) for n in lret: print n[:-1] Attention : don't read data inside the loop (for)... @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list