Do one of the following:
To create a script only for a project, right-click the Scripts node of the project in the ProAVA2 Explorer tab.
To create a script available to all projects, right-click the Global Scripts node in the ProAVA2 Explorer tab.
Click New Script on the shortcut menu. A script node appears under the node you original selected, with a default name (with .py appended) that is selected for editing.
Type a file name for the script and press Enter.
A script editing window appears. Project-specific scripts are created in the scripts subdirectory of the project's directory. Global scripts are created in root\lib\cp\plugin\proava2\scripts, where root is the directory of the ProAVA2 installation.
Type Python statements in the script editing window to create your script.
When you press Enter to create new lines, line numbers appear at the left edge of the window. These numbers are not saved as part of the script file.
You can move the text cursor and select and manipulate text just as you would in Notepad, or any other text editor. Press Ctrl+X to cut text, Ctrl+C to copy text, and Ctrl+V to paste text.
To produce messages in the Output tab, use the following idioms in your script:
from enthought.logging import logger
logger.info("string")
logger.debug("string")
logger.warn("string")
logger.error("string")
logger.critical("string")
logger.exception("Use this in an except block.")
To save the script file, press Ctrl+S.
To specify input and output parameters for your script:
On the Input or Outputs tab, click Insert new
item () on the table toolbar. A
row is added to the table, and an editor for the parameter appears in
the Editor sub-tab.
Specify settings for the parameter.
Repeat steps b and c for each input or output parameter of the script.
To specify metadata for the script:
Click the General tab.
Enter a Name and Description for the script; these values will appear in the Component Library Browser dialog box.
Optionally, click Insert
new item () on the Metadata table toolbar.
Specify a Name and Value for the metadata item; this information is used to filter the components that appear in the Component Library Browser dialog box.
Click Save to save the script.
Click Cancel to close the script editing window.