13.5. Running a Python Script Using Jython

To run a Jython program, simply use the jython script in ekm-client/bin. This script will execute the Jython interpreter with all of the necessary JAR files needed to use the library. There are sample Jython programs in ekm-client/samples/jython.

To run one of these programs, open a command prompt or shell, change to the ekm-client/samples/jython directory and type jython program-name. For example:

F:\ekm182\v182\ekm-client>cd samples\jython

F:\ekm182\v182\ekm-client\samples\jython>jython OpenCloseConnection.py
15:19:35,573 DEBUG RepositoryConnectionManager:? - Open started: temp[http://machine764:8080,null]
15:19:37,725 DEBUG RepositoryConnectionManager:? - Setup completed
15:19:37,726  INFO RemoteRepositoryAdapter:? - Using cache: false
15:19:37,849 DEBUG RepositoryConnectionManager:? - Open completed
>>>>> Connection Default@machine76412[http://machine764:8080,Default] opened
15:19:38,025 DEBUG RepositoryConnectionManager:? - Connection closed: Default@machine76412
[http://machine764:8080,Default]
>>>>> Connection Default@machine76412[http://machine764:8080,Default] closed

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