Calling Python Class Methods
Hi,
What is the Python syntax I can use from a ClassMethod (developed in an IRIS using embedded Python), in order to invoke another class method,
- in the same class; and
- in another class.
I see 'self' is synonymous to use $this (..) in ObjectScript, but these are ClassMethods I am invoking, and self did not seem to work.
thanks - Steve
Product version: IRIS 2021.2
$ZV: IRIS for Windows (x86-64) 2021.2
I found only this way when it's working. __name__ will have current classname
Thanks...
I see what you are doing here. Yes that would work.
Steve
btw, if you would need to call other method which is also Python
In this case this method appears can be accessible through the python class named as the current class (without package), in my case it's Test
Hi Steve, have a look a this github repo, it has a lot of examples :
Here is what you are looking for call python methods from objectscript and vice versa :
Hi,
In the above example, don't you have to instantiate ObjectScript.Embedded.Python ? Here you are calling instance method from instance method which work fine with 'self' (already knew that).. my question was asking about using/ referencing ClassMethods from other python class methods.