Lines Matching defs:code
26 * %reset - to reset the cached code and magic state.
27 * %noreset - to not reset the cached code and magic state
70 # A list of (code, magic) tuples.
71 # All the previous cell's code we have run since the last reset.
157 def get_magic(self, code):
158 """Given a block of code remove the magic lines from it.
159 Returns a tuple of newline joined code lines and a dictionary of magic.
189 lines = code.splitlines()
249 """Get the code that do_execute should use, taking into account
250 the code from any cached cells.
252 Returns the code to compile and the arguments to use to do so.
258 >>> k.get_code_and_args("%args 1\\nSome code")
259 ('Some code', ['1'])
260 >>> k.get_code_and_args("%args 2\\nSome more code")
261 ('Some code\\nSome more code', ['2'])
262 >>> k.get_code_and_args("%reset\\n%args 3 4\\nSome new code")
263 ('Some new code', ['3', '4'])
264 >>> k.get_code_and_args("%reset\\nSome new code")
265 ('Some new code', [])
303 self, code, silent, store_history=True, user_expressions=None, allow_stdin=False
305 """Execute user code using llvm-tblgen binary."""
307 all_code, args = self.get_code_and_args(code)