11.9. Running Python and BeanShell Scripts From a Command Window

Engineering Knowledge Manager

Administration Guide | Chapter 11: Scripts and Journals |

11.8. Example of Journal Recording and Execution |  | 11.10. Testing or Debugging a Process Template
Prev |  | Next

## 11.9. Running Python and BeanShell Scripts From a Command Window

Admin users can use the Open Command Window scripting action to open a command window and define and/or execute a Python or BeanShell script on demand.

Note: A limitation of Python is that the error output from a script is displayed only in the console of your application server (for example, JBoss 7) and does not appear in the Output log in the Open Command Window dialog box.

To run a Python or BeanShell script:

1. Select Scripting > Open Command Window.

   Figure 11.3: Open Command Window Dialog Box

2. Select the scripting language that you will use. Supported languages are `Python` and `BeanShell`.

3. You can copy and paste text from a script or enter the script commands directly into the Script input box. Click the Submit button and the script commands will be immediately processed by EKM and the submitted script, as well as any output, will be displayed in the Output log.

4. To load a script command file from your local file system, click Browse and select the BeanShell or Python script file, then click the Load button. The script will not be executed at this point, but its contents will appear in the Script Input text box. This allows you to view and modify the commands before they are executed. Once you are ready, you can click Submit to execute it.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.