frontend.linefrontendbase — IPython v0.10 documentation

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »

# 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__`(shell=None, history=None, banner=None, *args, **kwargs)
  `after_execute`()
    All the operations required after an execution to put the terminal back in a shape where it is usable.
  `complete`(line)

    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`(python_string, raw_string=None)
    Stores the raw_string in the history, and sends the python string to the interpreter.
  `execute_command`(command, hidden=False)
    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`(string)

    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`(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`(string)
    Prefilter the input to turn it in valid python.
  `render_error`(failure)
    Frontend-specific rendering of error.
  `render_result`(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`(string, refresh=True)

    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`(possibilities, new_line=None)

    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`(strings)
  Given a list of strings, return the common prefix between all these strings.

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »