frontend.prefilterfrontend — IPython 0.10.2 documentation

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »

# frontend.prefilterfrontend

## Module: `frontend.prefilterfrontend`

Inheritance diagram for `IPython.frontend.prefilterfrontend`:

Frontend class that uses IPython0 to prefilter the inputs.

Using the IPython0 mechanism gives us access to the magics.

This is a transitory class, used here to do the transition between ipython0 and ipython1. This class is meant to be short-lived as more functionnality is abstracted out of ipython0 in reusable functions and is added on the interpreter. This class can be a used to guide this refactoring.

## `PrefilterFrontEnd`

class `IPython.frontend.prefilterfrontend.` `PrefilterFrontEnd`(ipython0=None, argv=None, *args, **kwargs)

  Bases: `IPython.frontend.linefrontendbase.LineFrontEndBase`

  Class that uses ipython0 to do prefilter the input, do the completion and the magics.

  The core trick is to use an ipython0 instance to prefilter the input, and share the namespace between the interpreter instance used to execute the statements and the ipython0 used for code completion...

  `__init__`()

    Parameters : | ipython0: an optional ipython0 instance to use for command : prefiltering and completion. : argv : list, optional Used as the instance’s argv value. If not given, [] is used.

  `capture_output`()

    Capture all the output mechanisms we can think of.

  `complete`()
  `debug` = False
  `do_exit`()

    Exit the shell, cleanup and save the history.

  `execute`()
  `prefilter_input`()

    Using IPython0 to prefilter the commands to turn them in executable statements that are valid Python strings.

  `release_output`()

    Release all the different captures we have made.

  `save_output_hooks`()

    Store all the output hooks we can think of, to be able to restore them.

    We need to do this early, as starting the ipython0 instance will screw ouput hooks.

  `show_traceback`()

    Use ipython0 to capture the last traceback and display it.

  `system_call`()

    Allows for frontend to define their own system call, to be able capture output and redirect input.

`IPython.frontend.prefilterfrontend.` `mk_system_call`()

  given a os.system replacement, and a leading string command, returns a function that will execute the command with the given argument string.

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »