Skip to content

Instantly share code, notes, and snippets.

@biancarosa
Created August 13, 2018 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biancarosa/ff552e5d7244112e9e71267b5211be6d to your computer and use it in GitHub Desktop.
Save biancarosa/ff552e5d7244112e9e71267b5211be6d to your computer and use it in GitHub Desktop.
from datetime import datetime
import Pyro4
server = Pyro4.Proxy(f"PYRONAME:mess.server")
def start_chatting():
text = ''
while (text != 'exit'):
text = input("... ")
now = datetime.now()
server.send_message(text)
print(f'sent at {now:%H:%M:%S} \n')
if __name__ == '__main__':
try:
start_chatting()
except (KeyboardInterrupt, EOFError):
print('Goodbye! (:')
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment