Python Module(3.1)

Use the Python Module to write shared Python code that can be imported into other Python configurations. This allows you to organize your Python code in different modules that can be reused.

Python Module configuration

Enter Python code in the code area. Below the text area there are line, column and position indicators to help you find syntax errors.

Toolbar

The toolbar includes the following options:

OptionDescription
New

Creates a new Python Module configuration in a new tab. You can only create a configuration of the same kind as the one in the tab you are working in.

OpenOpens a saved configuration that is visible in a new tab. You can only open a configuration of the same kind as the one in the tab you are working in.
Save

Saves the configuration.

After clicking Save, a dialog box opens. In the Version Comment text box, you can enter a description of the changes that you have made, then click OK

Save As

Select to save the configuration with a new name. You can only use a-z, A-Z, 0-9, "-" and "_" to name a configuration.

After clicking Save As, a dialog box opens. Select in which folder you want to save the configuration. In the Version Comment text box, you can enter a description of the changes made. Then click OK

PermissionsTo set the owner of the configuration as well as Read, Write and Execute permissions for the groups accessing the configuration. 
ValidateRuns the current Python code. The status of the validation is displayed in a dialog. Upon failure, the erroneous line is highlighted and a message, including the line number, is displayed.
References

Select to see the Reference Viewer listing references to and from the active configuration. The Reference Viewer includes the following tabs:

  • Used By: Displays a list of other configurations that refer to the configuration. For example: a workflow group that refers to a workflow.

  • Uses: Displays a list of other configurations that the configuration refers to. For example: a workflow configuration that refers to a specific profile.

  • Access: Displays the group of users that may access the configuration, and the user that created (owns) the configuration.

HistoryDisplays a drop-down list with file changes in the lower section of the window. If a file is selected, comments related to the file change are displayed.
UndoSelect this option to undo your last action.
RedoSelect this option to redo the last action you "undid" with the Undo option.
CutCuts your selection and copies it to the clipboard.
CopyCopies the selection to the clipboard.
PastePastes the clipboard contents.
FindDisplays a dialog where you can search for text and, if required, replace it.
Find AgainRepeats the search for the last string entered in the Find dialog.

Code Editor Assistance

To provide assistance when you are writing code in the Python code area, there are several features in place:

Syntax Highlighting - Different parts of the code are color coded according to type

Right-Click Menu - A menu which provides editor options

Code Completion - Code Completion which helps you to write code in the code editor by providing context-sensitive proposals.

Code Editor Outline - An outline navigation panel to make it easier to navigate the code

For further information on these features, see Code Editor Assistance.

Code Editor Outline

To make it easier to navigate in a Python code configuration, there is an Outline navigation panel to the right of the Code Editor.

The Code Editor Outline provides a view of all the blocks, variables, and methods in a Python code configuration and makes it possible to easily navigate between different types in the code. The entries in the navigation panel are automatically updated as you make valid entries in the Code Editor.

You can also filter what you want to display in the Outline navigation panel. Search for a specific block, variable, or method using the free text field, or by selecting one of the quick filter buttons:

b

Click to display or hide the blocks within the code configuration displayed in the Code Editor.

v

Click to display or hide the variables within the code configuration displayed in the Code Editor.

m

Click to display or hide the methods within the code configuration displayed in the Code Editor.

The Outline navigation panel can be hidden or visible. By default, it is visible and all the elements are displayed. To hide or display the navigation panel, click the vertical Outline button to the right of the Code Editor.

Configuration Diff Panel

To compare the current version of a Python configuration displayed with a previous version of the same configuration, use Configuration Diff to compare the two versions side by side.

To hide or display the Configuration Diff panel, click the Diff button to the right of the Code Editor. The panel can be hidden or visible. By default, it is hidden.

Navigate through the differences by scrolling both panes in parallel using the scroll bar to the right of either pane. To scroll through each pane separately, hover over the pane to scroll through, and use the scroll wheel on your mouse.

To skip through each difference in the panes, use the navigation buttons, Previous, Next, and Refresh:

ItemDescription
History

Click the History drop-down box to select the version to compare.

You can also display and view encrypted configurations. If you select an encrypted configuration, you are prompted to enter the relevant password to decrypt the configuration.

Previous

Click this button to skip to the previous difference in the configurations. The previous difference is highlighted in green.

Next

Click this button to skip to the next difference in the configurations. The next difference is highlighted in green.

Refresh

 

Click this button to display the updated version of the configuration. Configurations are not locked when you display them in Configuration Diff. If another user has modified and saved a configuration that you are viewing in this tool, you can click this button to view the latest updated version.

The section contains the following sub-sections: