After implementing a few scripts, you might decide to define your own Python classes. You will need to define a well-known location where your library of Python scripts are stored.
You have two options to define this location:
* set the "JYTHONPATH" environment variable
On Linux, type the following command prior to starting INTViewer:
export JYTHONPATH=/home/myuser/TestLib
In this example, the /home/myuser/TestLib directory contains your python files.
To verify that the "JYTHONPATH" environment variable was set correctly, you can use this command:
import java.lang.System as System
print System.getenv("JYTHONPATH")
* set the "python.path" property
For example, on Windows, if the INTViewer.bat file has
.\bin\intviewer64.exe -J-da -J-d64 -J-Xms128m -J-Xmx4g -J-Dsun.java2d.d3d=false
change it to
.\bin\intviewer64.exe -J-Dpython.path=C:\\TestLib -J-da -J-d64 -J-Xms128m -J-Xmx4g -J-Dsun.java2d.d3d=false
In this example, the C:\\TestLib directory contains your python files.
To test this, you don't need to modify the INTViewer.bat file. You can use you own local copy.
To verify that the "python.path" property was set correctly, use this command:
import java.lang.System as System
print System.getProperty("python.path")