def start_chat(self): ip_addr = raw_input('What IP (or type listen)?: ') name = raw_input('Name:') aes_cipher = AESCipher(raw_input('key: ')) chat = None if ip_addr.lower() == 'listen': chat = ChatServer(name,aes_cipher) else: chat = ChatClient(name,aes_cipher) chat.host = ip_addr chat.start() while True: text = raw_input('') chat.sendall(text)