Exemple #1
0
class User(MobileActor):
    def birth(self):
        self.server = ChatServer()
        self.server.addchild(self.incoming)
        Keyboard().listen(self.typed)

    def typed(self, msg):
        self.server.say(msg)

    def incoming(self, msg):
        print ">" + msg
Exemple #2
0
 def birth(self):
     self.server = ChatServer()
     self.server.addchild(self.incoming)
     Keyboard().listen(self.typed)