OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [windows/] [minimal python2.7.6/] [subprocess/] [process.py] - Rev 211

Go to most recent revision | 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()
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.