bufsize in subprocess

yves at zioup.com yves at zioup.com
Sun Jan 22 12:05:41 EST 2012


  import subprocess

  com = ['/bin/ls', '-l', '/usr/bin']
  with subprocess.Popen(com, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 
as proc:
    for line in proc.stdout:
      print('out: ' + str(line, 'utf8'))

-- 
Yves.                                                  http://www.SollerS.ca/
                                                        http://ipv6.SollerS.ca
                                                        http://blog.zioup.org/



More information about the Python-list mailing list