Consider the following Jython language restrictions when using the scripting
feature:
-
Java classes, including the Isight
SDK, are available in Jython only after they are imported, using statements
like:
import java.io.File
from com.engineous.sdk.vars import FileValueType
The first of these statements makes the type java.io.File
available as java.io.File. The second statement makes
class FileValueType available as simply FileValueType.
-
The Jython print statement is redirected to the Job
Log at runtime. Anything printed will be logged as though jobLog.logInfo("msg")
were called.
-
When your script is written in Jython and a string value is returned
by a Java method, it will not be a Java string wrapped in a Python object,
as is done for other Java objects. Instead, it will be a Python string.
This means that any “string functions” you wish to apply to that
value (length, substring, pattern-match, etc.) must be Python methods,
not Java methods.
-
In Jython, the Boolean values are spelled True and
False with a capital letter, as opposed to true
and false with a lower-case first letter in Java.
|