Advertisement
asees

Client.py

Jan 19th, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import rpyc
  2.  
  3.  
  4. def myprint(message):
  5. print message
  6.  
  7. conn = rpyc.connect("localhost",18888)
  8.  
  9. user_name = raw_input("Please enter your name: ")
  10. conn.root.serverPrint(user_name)
  11. conn.root.setCallback(myprint)
  12. conn.root.serverPrintMessage(user_name)
  13.  
  14. while(1==1):
  15. input_var = raw_input()
  16. if(input_var=="exit"):
  17. break
  18. conn.root.setCallback(myprint)
  19. conn.root.serverPrint(input_var)
  20.  
  21.  
  22.  
  23. conn.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement