Unnamed
public text v1 · immutable
def openPipe(command, verbose=False):
result = []
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
while True:
line = process.stdout.readline()
if not line:
break
if verbose:
print line
result.append(line[:-1])
return result