code: def _get_captcha(reddit_session, captcha_id):
      
      url = urljoin(reddit_session.config['captcha'],
                    captcha_id + '.png')
      sys.stdout.write('Captcha URL: {0}\nCaptcha: '.format(url))
      sys.stdout.flush()
      raw = sys.stdin.readline()
      if not raw:  # stdin has reached the end of file
          # Trigger exception raising next time through. The request is
          # cached so this will not require and extra request and delay.
          sys.stdin.close()
          return None
      return {'iden': captcha_id, 'captcha': raw.strip()}
docs: Prompt user for captcha solution and return a prepared result.