You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
250 B

import subprocess
p1 = subprocess.Popen('dir', shell=True, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
while True:
line = p1.stdout.readline()
if not line:
break
#the real code does filtering here
print (line.rstrip())

Powered by Informatica FP.