How do I call Python functions with "_" symbol in the name?
Hi folks!
Consider I need to call a python function which name contains "_" symbol (which is quite often in Python). How it could be called from ObjectScript?
E.g. here is the code:
Set sm = ##class(%SYS.Python).Import("sample")
write sm.helloworld() ; function without _
white sm.hello_world() ; function with _ - won't compile.
ObjectScriptObjectScript
Thanks in advance!
Product version: IRIS 2023.1
Does this work?
write sm."hello_world"()
Just use quotes for such cases
write sm."hello_world"()
Thanks both @John Murray @Dmitry Maslennikov