code: def interpret_script(shell_script):
      
      with CaptureOutput() as capturer:
          shell = subprocess.Popen(['bash', '-'], stdin=subprocess.PIPE)
          with open(shell_script) as handle:
              for line in handle:
                  sys.stdout.write(ansi_wrap('$', color='green') + ' ' + line)
                  sys.stdout.flush()
                  shell.stdin.write(line)
                  shell.stdin.flush()
              shell.stdin.close()
          time.sleep(12)
          # Get the text that was shown in the terminal.
          captured_output = capturer.get_text()
      # Store the text that was shown in the terminal.
      filename, extension = os.path.splitext(shell_script)
      transcript_file = '%s.txt' % filename
      logger.info("Updating %s ..", format_path(transcript_file))
      with open(transcript_file, 'w') as handle:
          handle.write(ansi_strip(captured_output))
docs: Make it appear as if commands are typed into the terminal.