MCPcopy
hub / github.com/pex-tool/pex / execute_content

Method execute_content

pex/pex.py:802–813  ·  view source on GitHub ↗
(
        cls,
        name,  # type: str
        content,  # type: str
        argv0=None,  # type: Optional[str]
    )

Source from the content-addressed store, hash-verified

800
801 @classmethod
802 def execute_content(
803 cls,
804 name, # type: str
805 content, # type: str
806 argv0=None, # type: Optional[str]
807 ):
808 # type: (...) -> Any
809 try:
810 program = compile(content, name, "exec", flags=0, dont_inherit=1)
811 except SyntaxError as e:
812 return "Unable to parse {}: {}".format(name, e)
813 return cls.execute_ast(name, program, argv0=argv0)
814
815 @classmethod
816 def execute_ast(

Callers 1

execute_interpreterMethod · 0.95

Calls 1

execute_astMethod · 0.80

Tested by

no test coverage detected