示例#1
0
 def _watchdog_key(self):
     """
     接受按键, 存入queue
     """
     while True:
         k = getch.getch()
         self.key_queue.put(k)
示例#2
0
 def _watchdog_key(self):
     """
     接受按键, 存入queue
     """
     while True:
         k = getch.getch()
         self.key_queue.put(k)
示例#3
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         self.queue.put(k)
         if k == 'o' or k == 'q' or k == 'h':
             break
示例#4
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         self.queue.put(k)
         if k == self.keys['QUIT']:
             break
示例#5
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         self.queue.put(k)
         if k == self.keys['QUIT']:
             break
示例#6
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         logger.info(k)
         self.queue.put(k)
         if k == 'q':
             break
示例#7
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         logger.info(k)
         self.queue.put(k)
         if k == 'q':
             break
示例#8
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         self.queue.put(k)
         # 此处退出时需要做一下判断, 不然会引发切换线程无法读取的bug
         if k == 'o' or k == 'q' or k == 'h' or k == 't':
             break
示例#9
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     while not self.quit:
         k = getch.getch()
         self.queue.put(k)
         # 此处退出时需要做一下判断, 不然会引发切换线程无法读取的bug
         # TODO: 按键映射
         if k == 'o' or k == 'q' or k == 'h' or k == 't':
             break
示例#10
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     try:
         while not self.quit:
             k = getch.getch()
             self.queue.put(k)
             # 此处退出时需要做一下判断, 不然会引发切换线程无法读取的bug
             # TODO: 按键映射
             if k == 'o' or k == 'q' or k == 'h' or k == 't':
                 break
     except:
         pass
示例#11
0
 def _controller(self):
     """
     接受按键, 存入queue
     """
     k = getch.getch()
     self.queue.put(k)
示例#12
0
文件: douban.py 项目: ChenghaoQ/Pyex
 def _watchdog_key(self):
     # why not use the instant one
     while True:
         k = getch.getch()
         self.key_queue.put(k)