예제 #1
0
파일: terminal.py 프로젝트: fredvdd/Swan
 def says(self):
   print("")
   while not self.queue.empty():
     (id, msg) = self.queue.get()
     print(ids.type(id) + " (from" + ids.port(id) + ") says: " + msg)
     if self.queue.empty():
       timing.sleep(1)
     print(self.loc + '>')
예제 #2
0
파일: displayable.py 프로젝트: fredvdd/Swan
 def add_actor(self, id):
   port = str(ids.port(id))
   host = self.hosts[port]
   host.add_actor(id)