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

bundles / IPython latest / IPython / core / interactiveshell / InteractiveShell / check_complete

function

IPython.core.interactiveshell:InteractiveShell.check_complete

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

Signature

def check_complete(self, code: str) → tuple[str, str]

Summary

Return whether a block of code is ready to execute, or should be continued

Parameters

code : string

Python input code, which can be multiline.

Returns

status : str

One of 'complete', 'incomplete', or 'invalid' if source is not a prefix of valid code.

indent : str

When status is 'incomplete', this is some whitespace to insert on the next line of the prompt.

Aliases

  • IPython.InteractiveShell.check_complete

Referenced by

This package