bundles / IPython latest / IPython / core / interactiveshell / InteractiveShell / run_code
function
IPython.core.interactiveshell:InteractiveShell.run_code
Signature
async def run_code ( self , code_obj , result = None , * , async_ = False ) Summary
Execute a code object.
Extended Summary
When an exception occurs, self.showtraceback() is called to display a traceback.
Parameters
code_obj: code objectA compiled code object, to be executed
result: ExecutionResult, optionalAn object to store exceptions that occur during execution.
async_: Bool (Experimental)Attempt to run top-level asynchronous code in a default loop.
Returns
False: successful execution.True: an error occurred.
Aliases
-
IPython.InteractiveShell.run_code