def configInputQueue():
 def captureInput(iqueue):
  while True:
   c = getch()
   if ((c == u'\x03') or (c == u'\x04')):
    log.debug(u'Break received (\\x{0:02X})'.format(ord(c)))
    iqueue.put(c)
    break
   log.debug(u"Input Char '{}' received".format((c if (c != u'\r') else u'\\r')))
   iqueue.put(c)
 input_queue = queue.Queue()
 input_thread = threading.Thread(target=(lambda : captureInput(input_queue)))
 input_thread.daemon = True
 input_thread.start()
 return (input_queue, input_thread)

def configInputQueue ( ) : def captureInput ( iqueue ) : while True : c = getch ( ) if ( ( c == u'\x03' ) or ( c == u'\x04' ) ) : log . debug ( u'Break received (\\x{0:02X})' . format ( ord ( c ) ) ) iqueue . put ( c ) break log . debug ( u"Input Char '{}' received" . format ( ( c if ( c != u'\r' ) else u'\\r' ) ) ) iqueue . put ( c ) input_queue = queue . Queue ( ) input_thread = threading . Thread ( target = ( lambda : captureInput ( input_queue ) ) ) input_thread . daemon = True input_thread . start ( ) return ( input_queue , input_thread )
configure a queue for accepting characters and return the queue .