%SYS.Python

Python interface
Import a module, and invoke its services.

Method Inventory

Methods

method %DispatchGetProperty(name As %String) as %Integer [ Language = cpp ]
Get a python object attribute.
method %DispatchSetProperty(propName As %Library.String, value As %Library.String) [ Language = cpp ]
Get a python object attribute.
classmethod Bytes(cmd As %Binary) as %Integer [ Language = cpp ]
Convert COS string to a python bytes object. The sting cannot contain any wide char.
classmethod ChangeSignalState(state As %Integer) as %Integer [ Language = cpp ]
Set the signal handling state 0 - swap, 1 - disable swapping iris will notify, to python signal handling
method Cleanup() [ Language = cpp ]
Release all associated resources
classmethod Debugging(state As %Integer) as %Integer [ Language = cpp ]
If passed true, it doesn't reset the error context before invoking any python feature (enable this befor invoking any pdb method).
classmethod False() as %Integer [ Language = cpp ]
Returns Python True object.
classmethod Import(name As %Binary) as %Integer [ Language = cpp ]
Loads a module and returns an object.
Returns zero on failure.
classmethod Install(packages As %String, dir As %String = "") as %Status [ Language = objectscript ]
Installs a new Python package into $MGRDIR/python by calling pip. Install progress will be written to the current device.
classmethod None() as %Integer [ Language = cpp ]
Return python None object that can be used for assignment or as argument.
classmethod Run(cmd As %Binary) as %Integer [ Language = cpp ]
Run a Python cmd, multiple can be separated by new line $c(10)
classmethod SetStdIOMode(flags As %Integer) as %Integer [ Language = cpp ]
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
classmethod True() as %Integer [ Language = cpp ]
Returns Python True object.

Inherited Members

Inherited Methods

Feedback