code: def do_load(self, args: argparse.Namespace) -> None:
          
          expanded_path = os.path.abspath(os.path.expanduser(args.script_path))
  
          # Make sure the path exists and we can access it
          if not os.path.exists(expanded_path):
              self.perror("'{}' does not exist or cannot be accessed".format(expanded_path), traceback_war=False)
              return
  
          # Make sure expanded_path points to a file
          if not os.path.isfile(expanded_path):
              self.perror("'{}' is not a file".format(expanded_path), traceback_war=False)
              return
  
          # Make sure the file is not empty
          if os.path.getsize(expanded_path) == 0:
              self.perror("'{}' is empty".format(expanded_path), traceback_war=False)
              return
  
          # Make sure the file is ASCII or UTF-8 encoded text
          if not utils.is_text_file(expanded_path):
              self.perror("'{}' is not an ASCII or UTF-8 encoded text file".format(expanded_path), traceback_war=False)
              return
  
          try:
              # Read all lines of the script and insert into the head of the
              # command queue. Add an "end of script (eos)" command to cleanup the
              # self._script_dir list when done.
              with open(expanded_path, encoding='utf-8') as target:
                  script_commands = target.read().splitlines()
          except OSError as ex:  # pragma: no cover
              self.perror("Problem accessing script from '{}': {}".format(expanded_path, ex))
              return
  
          if args.transcript:
              self._generate_transcript(script_commands, os.path.expanduser(args.transcript))
              return
  
          self.cmdqueue = script_commands + ['eos'] + self.cmdqueue
          self._script_dir.append(os.path.dirname(expanded_path))
docs: Run commands in script file that is encoded as either ASCII or UTF-8 text