mirror of
https://github.com/arun11299/cpp-subprocess.git
synced 2025-08-05 12:56:23 -04:00
8 lines
200 B
Python
Executable File
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]
|