code: def interactive(renderer):
      
      _import_readline()
      _print_heading(renderer)
      contents = []
      more = False
      while True:
          try:
              prompt, more = ('... ', True) if more else ('>>> ', True)
              contents.append(input(prompt) + '\n')
          except EOFError:
              print('\n' + mistletoe.markdown(contents, renderer), end='')
              more = False
              contents = []
          except KeyboardInterrupt:
              print('\nExiting.')
              break
docs: Parse user input, dump to stdout, rinse and repeat.
      Python REPL style.