I have a custom Buffer class which is designed to capture written/printed statements to the device, to be able to transform the captured text to string or stream type. I have used this in ObjectScript to capture ObjectScript write statements and return a string. I would like to try to use this with a [ Language = python ] method as follows. This class will be called by a scheduled task.
/// ObjectScript code which initializes buffer to capture statements written in nested method callClassMethod CollectStringFromBuffer()
{
set buffer = ##class(CustomClass.Buffer).%New()
do buffer.B


.png)

.png)