AmesimKnowledge

The App Designer in detail > Editing Python files

The Python editor

The Python editor

The App Designer contains a basic Python Editor:

Figure 67: The Python editor

This editor contains some basic functions such as:

  • Syntax highlighting

  • Line numbering

  • White space display

  • Indenting and auto-indenting

  • Commenting

  • Go to line

  • Search and replace

  • Undo/Redo

The regular expression syntax used by the search and replace functionality is the one provided by the Qt QRegularExpression class. Its documentation is available here: Qt 6.5/QRegularExpression.

The captured text can be used in the Replace field, by using &, \0, \1, etc.

& represents the entire search string (evaluated)

\0 represents the entire search string (evaluated), just like &

\1 represents the first captured text

\2 represents the second captured text, etc.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.App_Designer/The_Python_editor · retrieved 2026-07-17