def _readline_workaround():
 if (not sys.platform.startswith('win32')):
  return
 try:
  import readline
 except ImportError:
  pass

def _readline_workaround ( ) : if ( not sys . platform . startswith ( 'win32' ) ) : return try : import readline except ImportError : pass
ensure readline is imported so that it attaches to the correct stdio handles on windows .