1 .. _python_viewer_page:
7 The functionalities of Python viewer are available via its Toolbar.
9 .. image:: ../images/pythonviewer_toolbar.png
15 .. image:: ../images/python_new.png
18 **New** - clears the viewer to create a new script. If viewer was modified, you will be asked to close it before removing.
23 .. image:: ../images/python_open.png
26 **Open** - allows opening an existing script by browsing for it in a standard **Open File** dialog box, choosing the required .py file and clicking **Open** button. If there is an already opened script, you will be asked to close it before opening new one.
31 .. image:: ../images/python_save.png
34 **Save** - saves the current script.
37 If the script has not been previously saved, Save calls the standard **Save File** dialog, where you can enter the script name and save it.
43 .. image:: ../images/python_saveas.png
46 **Save As...** - allows saving the current script with a new name. Input a new name for the script in the standard **Save file as ** dialog box and click **Save** button.
51 .. image:: ../images/python_undo.png
54 **Undo** - undoes the last action in Python viewer.
59 .. image:: ../images/python_redo.png
62 **Redo** - redoes the previously undone action in Python viewer.
67 .. image:: ../images/python_cut.png
70 **Cut** - saves the selected text into the clipboard and removes it from the viewer.
75 .. image:: ../images/python_copy.png
78 **Copy** - saves the selected text into the clipboard.
83 .. image:: ../images/python_paste.png
86 **Paste** - restores the saved text from the clipboard.
91 .. image:: ../images/python_delete.png
94 **Delete** - removes the selected text.
99 .. image:: ../images/python_selectall.png
102 **Select All** - selects the whole text.
107 .. image:: ../images/python_preferences.png
110 **Preferences** - provides access to the preferences dialog box, that allows specifying advanced parameters for the Python Viewer.
112 .. _custom_python_preferences:
114 Custom Python preferences
115 =========================
117 .. image:: ../images/python_view_preferences.png
120 The following options are available:
122 - **Font settings** allows setting font variant and its size.
124 - **Display settings** specifies the script representation in the viewer:
126 - **Enable current line highlight** switches on background coloring of the current line.
127 - **Enable text wrapping** wraps lines at the view border of the editor.
128 - **Center cursor on scroll** scrolls the script vertically to make the cursor visible at the center of the viewer.
129 - **Display line numbers area** shows a panel with line numbers of the script at the left border of the editor.
131 - **Tab settings** allows displaying tab indentation as a certain number of white-spaces.
133 - **Vertical edge settings** manages drawing of a vertical line at the specified column of the viewer.
135 - **Save settings as default** button stores the applied Python viewer settings in the SALOME preferences .xml file. The settings will be restored in the current and next SALOME sessions.
137 The buttons in in the bottom part of dialog box peform the following actions:
139 - **OK** button applies preferences to the editor;
141 - **Cancel** button rejects changes;
143 - **Defaults** button restores preferences from applicaion's defaults;
145 - **Help** button opens Help browser.