def kill(self): result = tkMessageBox.askyesno(message='Are you sure you want to kill the submarine?', icon='question', title='Kill') if result == True: message = create_kill() self.communicator.write(message) print "Sent kill"
def kill_submarine(self): self.socket.write(create_kill())