openalea.oalab.editor package¶
Submodules¶
openalea.oalab.editor.completion module¶
openalea.oalab.editor.goto module¶
openalea.oalab.editor.highlight module¶
openalea.oalab.editor.line_number module¶
openalea.oalab.editor.lpy_lexer module¶
pygments.lexers.lpy¶
Lexers for L-Py language.
copyright: | Copyright 2006-2013 by the Pygments team, see AUTHORS. |
---|---|
license: | BSD, see LICENSE for details. |
authors: | Julien COSTE, Guillaume BATY, Frederic BOUDON, Christophe PRADAL |
homepage: | http://openalea.gforge.inria.fr/wiki/doku.php?id=packages:vplants:lpy:main |
- class openalea.oalab.editor.lpy_lexer.LPyLexer(**options)[source]¶
Bases: pygments.lexers.agile.PythonLexer
Lexer for LPy language.
- aliases = ['lpy', 'Lpy', 'LPy', 'l-py', 'L-py', 'L-Py']¶
- filenames = ['*.lpy']¶
- mimetypes = ['text/x-python', 'application/x-python']¶
- module_callback(lexer, match)[source]¶
Permit to detect and stock words after special words “axiom” and “module”. This words are then colourized like other keywords.
- name = 'LPy'¶
- tokens = {'lpykeywords': [('(^Axiom|^module)', Token.Generic.Subheading, 'module'), ('(^derivation length|-->|-static->|decomposition|^production|produce|homomorphism|^interpretation|group|^endlsystem|endgroup|maximum depth|nproduce|nsproduce|makestring|consider|ignore|forward|backward|isForward|StartEach|EndEach|Start|End|getGroup|useGroup|getIterationNb|module|@static|lpyimport)', Token.Generic.Subheading)], 'root': ['lpykeywords', inherit], 'module': [('(\\w*)(\\(.*\\))', <function module_callback at 0x10950f398>), ('( )(\\w*)( |$)', <function module_callback at 0x10950f398>), ('(:| )', Token.Text)]}¶
openalea.oalab.editor.search module¶
openalea.oalab.editor.text_editor module¶
- class openalea.oalab.editor.text_editor.RichTextEditor(session, controller, parent=None)[source]¶
Bases: PyQt4.QtGui.QWidget
- get_text(start='sof', end='eof')[source]¶
Return a part of the text.
Parameters: - start – is the begining of what you want to get
- end – is the end of what you want to get
Returns: text which is contained in the editor between ‘start’ and ‘end’
- set_script(txt)¶
Set text in the editor
Parameters: text – text you want to set
- class openalea.oalab.editor.text_editor.TextEditor(session, controller, parent=None)[source]¶
Bases: PyQt4.QtGui.QTextEdit
- get_text(start='sof', end='eof')[source]¶
Return a part of the text.
Parameters: - start – is the begining of what you want to get
- end – is the end of what you want to get
Returns: text which is contained in the editor between ‘start’ and ‘end’
- save(name=None)[source]¶
Save current file.
Parameters: name – name of the file to save. If not name, self.name is used. If self.name is not setted and name is not give in parameter, a File Dialog is opened.
- set_script(txt)¶
Set text in the editor
Parameters: text – text you want to set