IPython Documentation

Table Of Contents

Previous topic

Module: qt.console.console_widget

Next topic

Module: qt.console.history_console_widget

This Page

Module: qt.console.frontend_widget

2 Classes

class IPython.qt.console.frontend_widget.FrontendHighlighter(frontend, lexer=None)

Bases: IPython.qt.console.pygments_highlighter.PygmentsHighlighter

A PygmentsHighlighter that understands and ignores prompts.

__init__(frontend, lexer=None)
highlightBlock(string)

Highlight a block of text. Reimplemented to highlight selectively.

rehighlightBlock(block)

Reimplemented to temporarily enable highlighting if disabled.

setFormat(start, count, format)

Reimplemented to highlight selectively.

class IPython.qt.console.frontend_widget.FrontendWidget(*args, **kw)

Bases: IPython.qt.console.history_console_widget.HistoryConsoleWidget, IPython.qt.base_frontend_mixin.BaseFrontendMixin

A Qt frontend for a generic Python kernel.

__init__(*args, **kw)
copy()

Copy the currently selected text to the clipboard, removing prompts.

copy_raw()

Copy the currently selected text to the clipboard without attempting to remove prompts or otherwise alter the text.

execute_file(path, hidden=False)

Attempts to execute file with ‘path’. If ‘hidden’, no output is shown.

interrupt_kernel()

Attempts to interrupt the running kernel.

Also unsets _reading flag, to avoid runtime errors if raw_input is called again.

reset(clear=False)

Resets the widget to its initial state if clear parameter is True, otherwise prints a visual indication of the fact that the kernel restarted, but does not clear the traces from previous usage of the kernel before it was restarted. With clear=True, it is similar to %clear, but also re-writes the banner and aborts execution if necessary.

restart_kernel(message, now=False)

Attempts to restart the running kernel.