Created
August 13, 2018 13:05
-
-
Save biancarosa/ff552e5d7244112e9e71267b5211be6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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