Package sanskrit
Class PyModule
java.lang.Object
sanskrit.PyModule
A builtin module such as math.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe member calledfn(a function, for instance), or null.put(String fn, Builtin.Fn body) Adds a function written in Java, callable asname.fn(...)from Python.Adds a constant built from plain Java values: aMapwith String keys becomes adict(in the order of the map), aListalist, aStringastr.Adds a constant string, readable asname.constant.putStringMap(String constant, Map<String, String> values) Adds a constantdictof strings, in the order of the map.static ObjectstringDict(Map<String, String> values) A newdictof strings, in the order of the map: the value a function returns.
-
Constructor Details
-
PyModule
-
-
Method Details
-
put
Adds a function written in Java, callable asname.fn(...)from Python. -
putString
Adds a constant string, readable asname.constant. -
putStringMap
Adds a constantdictof strings, in the order of the map. -
stringDict
A newdictof strings, in the order of the map: the value a function returns. -
putPlain
Adds a constant built from plain Java values: aMapwith String keys becomes adict(in the order of the map), aListalist, aStringastr. Nothing else is accepted: no Java object is ever exposed to a script. -
get
The member calledfn(a function, for instance), or null.
-