-
Notifications
You must be signed in to change notification settings - Fork 4
Transport Documentation
Adam Janin edited this page May 3, 2016
·
3 revisions
The following is a minimal two-way chat example. In one shell, call minchat.py chat1 chat2
. In another shell, call minchat.py chat2 chat1
.
import sys
from nluas.Transport import Transport
myname = sys.argv[1]
remotename = sys.argv[2]
t = Transport(myname)
t.subscribe(remotename, lambda tuple: print('Got', tuple))
while True:
t.send(remotename, input())