<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_pyscript(self, args: argparse.Namespace) -> bool: """Run a Python script file inside the console"""

        script_path = os.path.expanduser(args.script_path)
        py_return = False

        # Save current command line arguments
        orig_args = sys.argv

        try:
            # Overwrite sys.argv to allow the script to take command line arguments
            sys.argv = [script_path] + args.script_arguments

            # Run the script - use repr formatting to escape things which
            # need to be escaped to prevent issues on Windows
            py_return = self.do_py("run({!r})".format(script_path))

        except KeyboardInterrupt:
            pass

        finally:
            # Restore command line arguments to original state
            sys.argv = orig_args

        return py_return