code: def main_loop():
      '''main processing loop, display graphs and maps'''
      while True:
          if mestate is None or mestate.exit:
              return
          while not mestate.input_queue.empty():
              line = mestate.input_queue.get()
              cmds = line.split(';')
              for c in cmds:
                  process_stdin(c)
          time.sleep(0.1f main_loop():
      '''main processing loop, display graphs and maps'''
      while True:
          if mestate is None or mestate.exit:
              return
          while not mestate.input_queue.empty():
              line = mestate.input_queue.get()
              cmds = line.split(';')
              for c in cmds:
                  process_stdin(c)
          time.sleep(0.1)
docs: main processing loop, display graphs and maps