Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!usr/bin/env python
- from __future__ import absolute_import, division, print_function, unicode_literals
- import subprocess
- p = subprocess.Popen(
- ['python2.7', 'slave.py'],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- )
- while True:
- p.stdin.write("0\n")
- p.stdin.flush()
- response = p.stdout.readline().strip()
- print("main get {}".format(response))
- if int(response) == 0:
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement