URL
https://opencores.org/ocsvn/phr/phr/trunk
Subversion Repositories phr
[/] [phr/] [trunk/] [codigo/] [gui/] [windows/] [minimal python2.7.6/] [subprocess/] [process.py] - Rev 172
Compare with Previous | Blame | View Log
#from subprocess import check_output #st = check_output("dir C:", shell=True) #print st import subprocess command = "dir c:" # the shell command process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) #Launch the shell command: #output, error = process.communicate() #print output for line in iter(process.stdout.readline, ''): print line, process.stdout.close() #while True: # out = process.stdout.read(1) # if out == '' and process.poll() != None: # break # if out != '': # sys.stdout.write(out) # sys.stdout.flush()