MCPcopy Index your code
hub / github.com/bpython/bpython / load_code

Method load_code

bpython/curtsiesfrontend/coderunner.py:111–117  ·  view source on GitHub ↗

Prep code to be run

(self, source)

Source from the content-addressed store, hash-verified

109 return self.source and self.code_context
110
111 def load_code(self, source):
112 """Prep code to be run"""
113 assert self.source is None, (
114 "you shouldn't load code when some is " "already running"
115 )
116 self.source = source
117 self.code_context = None
118
119 def _unload_code(self):
120 """Called when done running code"""

Callers 3

test_simpleMethod · 0.95
test_exceptionMethod · 0.95
pushMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_simpleMethod · 0.76
test_exceptionMethod · 0.76