%SYS.Python
class %SYS.Python extends %Library.SystemBase
Python interface
Import a module, and invoke its services.
Method Inventory
- %DispatchGetProperty()
- %DispatchSetProperty()
- Builtins()
- Bytes()
- ChangeSignalState()
- Debugging()
- False()
- Import()
- Install()
- None()
- Run()
- SetStdIOMode()
- Shell()
- To2DListTyped()
- ToList()
- ToListTyped()
- True()
Methods
Get a python object attribute.
method %DispatchSetProperty(propName As %Library.String, value As %Library.String) [ Language = cpp ]
Get a python object attribute.
classmethod Builtins(flags As %Integer)
Direct access to python builtins library
Convert COS string to a python bytes object. The sting cannot contain any wide char.
Set the signal handling state 0 - swap, 1 - disable swapping iris will notify,
to python signal handling
If passed true, it doesn't reset the error context before invoking any python
feature (enable this before invoking any pdb method).
classmethod False() as %Integer [ Language = cpp ]
Returns Python True object.
Loads a module and returns an object.
Returns zero on failure.
Returns zero on failure.
This is deprecated, please use the pip3 command line to install packages.
classmethod None() as %Integer [ Language = cpp ]
Return python None object that can be used for assignment or as argument.
Run a Python cmd, multiple can be separated by new line $c(10)
if flags bit 1 is set, the stderr (fd 2) output will be redirected to stdout (fd 1) if there is a current COS primary device, otherwise it will behave the original way and log it in messages.log
Interactive Python Shell
classmethod To2DListTyped(contentList As %Integer, typeList As %Integer) as %Integer [ Language = cpp ]
Takes in a 2D ObjectScript $LIST, and another $LIST with type info for each column in the first $LIST.
Returns a copy of the first $LIST as a python list with matching python types.
Returns a copy of the first $LIST as a python list with matching python types.
Takes in an ObjectScript $LIST. Returns a copy of the first $LIST as a python list with matching python types.
classmethod ToListTyped(contentList As %Integer, typeList As %Integer) as %Integer [ Language = cpp ]
Takes in an ObjectScript $LIST, and another $LIST with type info for each element in the first $LIST.
Returns a copy of the first $LIST as a python list with matching python types.
Returns a copy of the first $LIST as a python list with matching python types.
classmethod True() as %Integer [ Language = cpp ]
Returns Python True object.