openalea.vpltk.shell package¶
Submodules¶
openalea.vpltk.shell.ipythoninterpreter module¶
- class openalea.vpltk.shell.ipythoninterpreter.Interpreter(gui='qt4', locals=None)[source]¶
Bases: IPython.kernel.inprocess.ipkernel.InProcessKernel
Interpreter is an IPython kernel adapted for OpenAlea.
Parameters: - gui – GUI to use. Default ‘qt4’.
- locals – namespace to set to the interpreter. Default ‘None’.
openalea.vpltk.shell.ipythonshell module¶
- class openalea.vpltk.shell.ipythonshell.ShellWidget(interpreter, message='', log='', parent=None)[source]¶
Bases: IPython.qt.console.rich_ipython_widget.RichIPythonWidget, openalea.vpltk.shell.streamredirection.GraphicalStreamRedirection
ShellWidget is an IPython shell.
- loadcode(source=None, namespace=None)[source]¶
Load ‘source’ and use ‘namespace’ if it is in parameter. Else use locals.
Parameters: - source – text (string) to load
- namespace – dict to use to execute the source
openalea.vpltk.shell.scishell module¶
This module implements a QT4 python interpreter widget.
- class openalea.vpltk.shell.scishell.SciShell(interpreter, message='', log='', parent=None)[source]¶
Bases: PyQt4.Qsci.QsciScintilla, openalea.vpltk.shell.streamredirection.GraphicalStreamRedirection
SciShell is a Python shell based in QScintilla. It is inspired by PyCute (pycute.py) : http://gerard.vermeulen.free.fr (GPL) and Eric4 shell (shell.py) : http://www.die-offenbachs.de/eric/index.html (GPL)
- focusNextPrevChild(next)[source]¶
Reimplemented to stop Tab moving to the next window.
While the user is entering a multi-line command, the movement to the next window by the Tab key being pressed is suppressed.
@param next next window @return flag indicating the movement
- keyPressEvent(ev)[source]¶
Re-implemented to handle the user input a key at a time.
@param ev key event (QKeyEvent)
openalea.vpltk.shell.shell module¶
This module implements a QT4 python interpreter widget.
- class openalea.vpltk.shell.shell.PyCutExt(interpreter, message='', log='', parent=None)[source]¶
Bases: PyQt4.QtGui.QTextEdit, openalea.vpltk.shell.streamredirection.GraphicalStreamRedirection
PyCute is a Python shell for PyQt.
Creating, displaying and controlling PyQt widgets from the Python command line interpreter is very hard, if not, impossible. PyCute solves this problem by interfacing the Python interpreter to a PyQt widget.
This class is inspired by PyCute.py : http://gerard.vermeulen.free.fr (GPL)
- class openalea.vpltk.shell.shell.SyntaxColor[source]¶
Allow to color python keywords
- keywords = set(['and', 'elif', 'is', 'global', 'as', 'in', 'if', 'from', 'raise', 'for', 'except', 'finally', 'print', 'import', 'pass', 'return', 'exec', 'else', 'break', 'not', 'with', 'class', 'assert', 'yield', 'try', 'while', 'continue', 'del', 'or', 'def', 'lambda'])¶
openalea.vpltk.shell.streamredirection module¶
- class openalea.vpltk.shell.streamredirection.GraphicalStreamRedirection[source]¶
Bases: object
Redirection of a stream as graphic output
- multipleStdErrRedirection(enabled=True)[source]¶
make multiple (sys.stderr/pyconsole) or single (pyconsole) redirection of stderr
- class openalea.vpltk.shell.streamredirection.MultipleRedirection(*streams)[source]¶
Bases: object
Dummy file which redirects stream to multiple file