pyface.i_python_editor module¶
A widget for editing Python code.
- class pyface.i_python_editor.IPythonEditor(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]¶
Bases:
ILayoutWidget
A widget for editing Python code.
- dirty = Bool(False)¶
Has the file in the editor been modified?
- path = Str()¶
The pathname of the file being edited.
- show_line_numbers = Bool(True)¶
Should line numbers be shown in the margin?
- changed = Event()¶
The contents of the editor has changed.
- key_pressed = Event(KeyPressedEvent)¶
A key has been pressed.
- load(path=None)[source]¶
Loads the contents of the editor.
- Parameters
path (str or None) – The path to the file to load.
- save(path=None)[source]¶
Saves the contents of the editor.
- Parameters
path (str or None) – The path to the file to save.