How does python use scrolltext to display text to the same interface in different functions?

A main interface, and then button calls each function and wants to print the running real-time data to the scrolltext of the interface in the function.
I passed stext as an argument to the function, and then I did the stext.insert operation and found that it didn"t use
. Is there any way to solve it

?
Mar.07,2021

it is available to send stext directly. I think it is a problem that I tested earlier.

Menu