Forcing render to update

My problem is that I can print to the screen using onscreentext.

What I think would be a solution to try would be to force panda to update render. Or to update to the next frame. Something to update the screen.

What I do is I am sending control to another program by calling one of its functions in my code. But to print an error it calls a function I wrote so that I can print to the screen. I know it is calling the function correctly because of print statements. But panda will not update until that function that I called has ended and control is back to me.

I want to know if there is a way to force panda to update render so that the onscreentext shows up. Or update to the next frame so that the text shows. I was hoping there would be a function that would allow me to do this. If anyone has any suggests that would be great.

Thanks

base.graphicsEngine.renderFrame()

You might want to call it twice, because a renderFrame call only makes the output of the last render visible.