-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto.py
More file actions
23 lines (16 loc) · 703 Bytes
/
Copy pathauto.py
File metadata and controls
23 lines (16 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from subprocess import Popen, PIPE, STDOUT
'''
p = Popen(['python', 'prog.py'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
#print p.stdout.readline().rstrip()
print p.communicate('mike 123')[0].rstrip()
'''
#command = ['./client/client', '/home/bhegde/go/src/GoChat/client/pub_key', '/home/bhegde/go/src/GoChat/client/priv_key']
command = ['go', 'run', 'userinput.go']
p = Popen(command, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
print p.stdout.readline().rstrip()
print p.communicate("Hello")[0].rstrip()
print p.stdout.readline().rstrip()
print p.communicate("Hello")[0].rstrip()
#print p.communicate("World")[0].rstrip()
#print p.stdout.readline().rstrip()
#print p.communicate("Hello")[0].rstrip()