Reading STDOUT

Python

Public Domain

Because I can never remeber how to do this

Download (right click, save as, rename as appropriate)

Embed

Tags:

reminder
1
2
3
import subprocess

output,errors = subprocess.Popen('ls', stdout=subprocess.PIPE).communicate()