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/