3 ms·
And subprocess is available in 2.6, too. It looks like a well-designed API and certainly makes it easy to run external filters on data. For example, to get th
by dkarl 17y ago
And subprocess is available in 2.6, too. It looks like a well-designed API and certainly makes it easy to run external filters on data. For example, to get the output of 'tidy -q' on a string s:
proc = subprocess.Popen(['tidy', '-q'], stdin=PIPE, stdout=PIPE, stderr=PIPE)
(tidyout, tidyerr) = proc.communicate(input=s)
if proc.returncode != 0:
...
- tdavis 17y agoErrr, subprocess has been around since 2.4...