(
cls,
name, # type: str
program, # type: ast.AST
argv0=None, # type: Optional[str]
)
| 814 | |
| 815 | @classmethod |
| 816 | def execute_ast( |
| 817 | cls, |
| 818 | name, # type: str |
| 819 | program, # type: ast.AST |
| 820 | argv0=None, # type: Optional[str] |
| 821 | ): |
| 822 | # type: (...) -> Any |
| 823 | bootstrap.demote() |
| 824 | |
| 825 | from pex.compatibility import exec_function |
| 826 | |
| 827 | sys.argv[0] = argv0 or name |
| 828 | globals_map = globals().copy() |
| 829 | globals_map["__name__"] = "__main__" |
| 830 | globals_map["__file__"] = name |
| 831 | return Globals(exec_function(program, globals_map)) |
| 832 | |
| 833 | def execute_entry(self, entry_point): |
| 834 | # type: (Union[ModuleEntryPoint, CallableEntryPoint]) -> Any |
no test coverage detected