Debian Codegraph @

protolib/examples/protoPipeRecv.py

raw
1 #!/usr/bin/env python
2 import sys
3 import protokit
4
5 if len(sys.argv) != 2:
6 print "Usage: %s <pipeName>" % sys.argv[0]
7 sys.exit(1)
8
9 pipe = protokit.Pipe("MESSAGE")
10 pipe.Listen(sys.argv[1])
11 while True:
12 print pipe.Recv(1024)
13
14 print "Exiting..."