Inheritance diagram for IPython.gui.wx.ipython_view:
Provides IPython WX console widgets.
@author: Laurent Dufrechou laurent.dufrechou _at_ gmail.com This WX widget is based on the original work of Eitan Isaacson that provided the console for the GTK toolkit.
Original work from: @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD
All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, and is available at U{http://www.opensource.org/licenses/bsd-license.php}
Bases: wx._windows.Panel
This is wx.Panel that embbed the IPython Thread and the wx.StyledTextControl If you want to port this to any other GUI toolkit, just replace the WxConsoleView by YOURGUIConsoleView and make YOURGUIIPythonView derivate from whatever container you want. I’ve choosed to derivate from a wx.Panel because it seems to be more useful Any idea to make it more ‘generic’ welcomed.
Initialize. Instanciate an IPython thread. Instanciate a WxConsoleView. Redirect I/O to console.
Default exit handler
Key press callback with plenty of shell goodness, like history, autocompletions, etc.
Define an exit handler
Define a new history tracker
Define a new history tracker
Define a new status tracker
Default history tracker (does nothing)
Default history tracker (does nothing)
Default status tracker (does nothing)
Bases: wx.stc.StyledTextCtrl
Specialized styled text control view for console-like workflow. We use here a scintilla frontend thus it can be reused in any GUI that supports scintilla with less work.
@type ANSI_COLORS_BLACK: dictionary
@type ANSI_COLORS_WHITE: dictionary
@ivar color_pat: Regex of terminal color pattern @type color_pat: _sre.SRE_Pattern
Initialize console view.
@param parent: Parent widget @param prompt: User specified prompt @type intro: string @param intro: User specified startup introduction string @type intro: string @param background_color: Can be BLACK or WHITE @type background_color: string @param other: init param of styledTextControl (can be used as-is) @param autocomplete_mode: Can be ‘IPYTHON’ or ‘STC’
‘IPYTHON’ show autocompletion the ipython way ‘STC” show it scintilla text control way
Write given text to buffer in an asynchroneous way. It is used from another thread to be able to acces the GUI. @param text: Text to append @type text: string
Replace currently entered command line with given text.
@param text: Text to use as replacement. @type text: string
Get text in current command line.
@return: Text of current command line. @rtype: string
Return the length of current prompt
Prints prompt at start of line.
@param prompt: Prompt to print. @type prompt: string
Write given text to buffer.
@param text: Text to append. @type text: string
Bases: IPython.gui.wx.ipshell_nonblocking.NonBlockingIPShell
An NonBlockingIPShell Thread that is WX dependent.