This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / interactiveshell / InteractiveShell / run_code

function

IPython.core.interactiveshell:InteractiveShell.run_code

source: /IPython/core/interactiveshell.py :3712

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 object

A compiled code object, to be executed

result : ExecutionResult, optional

An 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