frontend.linefrontendbase

Module: frontend.linefrontendbase

Inheritance diagram for IPython.frontend.linefrontendbase:

Base front end class for all line-oriented frontends, rather than block-oriented.

Currently this focuses on synchronous frontends.

LineFrontEndBase

class IPython.frontend.linefrontendbase.LineFrontEndBase(shell=None, history=None, banner=None, *args, **kwargs)

Bases: IPython.frontend.frontendbase.FrontEndBase

Concrete implementation of the FrontEndBase class. This is meant to be the base class behind all the frontend that are line-oriented, rather than block-oriented.

__init__()
after_execute()

All the operations required after an execution to put the terminal back in a shape where it is usable.

complete()

Complete line in engine’s user_ns

Parameters :line : string
Returns :The replacement for the line and the list of possible completions. :
complete_current_input()

Do code completion on current line.

continuation_prompt()

Returns the current continuation prompt.

execute()

Stores the raw_string in the history, and sends the python string to the interpreter.

execute_command()

Execute a command, not only in the model, but also in the view, if any.

get_line_width()

Return the width of the line in characters.

is_complete()

Check if a string forms a complete, executable set of commands.

For the line-oriented frontend, multi-line code is not executed as soon as it is complete: the users has to enter two line returns.

new_prompt()

Prints a prompt and starts a new editing buffer.

Subclasses should use this method to make sure that the terminal is put in a state favorable for a new line input.

prefilter_input()

Prefilter the input to turn it in valid python.

render_error()

Frontend-specific rendering of error.

render_result()

Frontend-specific rendering of the result of a calculation that has been sent to an engine.

start()

Put the frontend in a state where it is ready for user interaction.

write()

Write some characters to the display.

Subclass should overide this method.

The refresh keyword argument is used in frontends with an event loop, to choose whether the write should trigget an UI refresh, and thus be syncrhonous, or not.

write_completion()

Write the list of possible completions.

new_line is the completed input line that should be displayed after the completion are writen. If None, the input_buffer before the completion is used.

IPython.frontend.linefrontendbase.common_prefix()

Given a list of strings, return the common prefix between all these strings.

Table Of Contents

Previous topic

frontend.frontendbase

Next topic

frontend.prefilterfrontend

This Page