2016-03-15 18:54:12 +05:30

8 lines
200 B
Python
Executable File

import subprocess
p = subprocess.Popen(["grep", "f"],
stdin = subprocess.PIPE,
stdout = subprocess.PIPE)
p.stdin.write('one\ntwo\four\n')
p.communicate()[0]