editor — Text editor class#

Text editor class for your favourite editor.

class editor.TextEditor[source]#

Bases: object

Text editor.

edit(text, jumpIndex=None, highlight=None)[source]#

Call the editor and thus allows the user to change the text.

Halts the thread’s operation until the editor is closed.

Parameters:
  • text (str) – the text to be edited

  • jumpIndex (Optional[int]) – position at which to put the caret

  • highlight (Optional[str]) – each occurrence of this substring will be highlighted

Returns:

the modified text, or None if the user didn’t save the text file in his text editor

Return type:

Optional[str]