gemseo / wrappers

template_grammar_editor module

GUI for edition of templates for inputs and outputs files To be used by DiscFromExe

Run this file with no argument to open the GUI

class gemseo.wrappers.template_grammar_editor.QtTemplateEditor(in_sep='GEMSEO_INPUT', out_sep='GEMSEO_OUTPUT')[source]

Bases: PySide2.QtWidgets.QMainWindow

GUI template generator.

GUI to generate templates for input and output files edition Input text file data is replaced by a mark that specifies where to read the data. idem for outputs. Works with any text file format.

To open the GUI, run this python file

Example, for an input json file : { “a”: 1.01515112125, “b”: 2.00151511213, “c”: 3.00151511213 }

Generates a template : { “a”: GEMSEO_INPUT{a::1.0}, “b”: GEMSEO_INPUT{b::2.0}, “c”: GEMSEO_INPUT{c::3.0} }

Same for outputs.

Constructor :

  • in_sep – separator name for the input tag, default GEMSEO_INPUT

  • out_sep – separator name for the output tag, default GEMSEO_OUTPUT

add_action(name, status_tip, shortcut, connect)[source]

Add an action with a button and icon.

  • name – name of the action

  • status_tip – tip for the user to browse with the mouse

  • shortcut – keyboard shortcut (Ctrl+S) for instance

  • connect – method to call at trigger

hightlight(sep, color='red')[source]

Highight some text.

  • sep – the regex that validates the text to highlight

  • color – the color to be used


Make an input from the selected data.


Make an output from the selected data.


Open the document for edition of the template.


Save the template to a file.

staticMetaObject = <PySide2.QtCore.QMetaObject object>

Entry point.