editor — Text editor class#
Text editor class for your favourite editor.
Note
This module uses userinterfaces.gui and has dependencies
from other partially external modules.
- class editor.TextEditor[source]#
Bases:
objectText editor.
Changed in version 8.0: Editor detection functions were moved from
config.Setup external 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 (int | None) – Position at which to put the caret
highlight (str | None) – 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:
str | None