diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-23 09:07:12 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-23 09:07:12 +0100 |
commit | 7380d1a0a708f869c7926ae323123b3e49feadcd (patch) | |
tree | a59f894ccad5105800d69b6c4a90c66c8489d0aa /voerbak/test.py | |
parent | 7764b874e4894547f15f14f64a9c23a22e2dcc43 (diff) |
moved voerbak to own subfolder with makefile
Diffstat (limited to 'voerbak/test.py')
-rw-r--r-- | voerbak/test.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/voerbak/test.py b/voerbak/test.py new file mode 100644 index 0000000..8cc1db9 --- /dev/null +++ b/voerbak/test.py @@ -0,0 +1,24 @@ +import subprocess + +w = 7 +h = 6 +column = 3 + +process = subprocess.Popen(["./voerbak"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=None) + +process.stdin.write(bytearray(f"{w} {h}\n", "utf-8")) +process.stdin.flush() + +process.stdin.write(bytearray(f"{column}\n", "utf-8")) +process.stdin.flush() + +# process.stdin.write(b"0\n") +# process.stdin.flush() +# for c in iter(lambda: process.stdout.read(1), b''): +# sys.stdout.write(c) + +print(process.stdout.readlines(5)) + |