MCPcopy Create free account
hub / github.com/AMAP-ML/Thinking-with-Map / __init__

Method __init__

demo/qwen_agent/tools/python_executor.py:39–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 HEADERS = []
38
39 def __init__(self):
40 self._global_vars = copy.copy(self.GLOBAL_DICT)
41 self._local_vars = copy.copy(self.LOCAL_DICT) if self.LOCAL_DICT else None
42
43 for c in self.HEADERS:
44 self.exec_code(c)
45
46 def exec_code(self, code_piece: str) -> None:
47 if regex.search(r'(\s|^)?input\(', code_piece) or regex.search(r'(\s|^)?os.system\(', code_piece):

Callers 1

__init__Method · 0.45

Calls 1

exec_codeMethod · 0.95

Tested by

no test coverage detected