I\'ve been fiddling with sending a variable from one script to another and have done some basic things pretty easily, but I have gotten stuck and was hoping to get some input.>
main.py
from subprocess import Popen, PIPE
import sys
p = Popen(['py', 'client.py'], stdout=PIPE)
while True:
o = p.stdout.read(1)
if o:
sys.stdout.write(o.decode('utf-8'))
sys.stdout.flush()
print '*'
else: break
client.py
import time
for a in xrange(3):
time.sleep(a)
print a
OUT:
0*
*
*
1*
*
*
2*
*
*