Forum: Poser Python Scripting


Subject: Poserscript: debugging issue

gbn opened this issue on Aug 03, 2014 · 1 posts


gbn posted Sun, 03 August 2014 at 3:51 PM

I'm using a script w/o GUI. In loops w/ huge iteration I experienced this behaviour til PoserPro 2014 inclusive: During first runs of the loop prints or logging.outputs operates in realtime manner, after a while further prints are suspended and come out not before the script ends. In case of long operations I don't know hence whether Poser is running OK or is having a life lock, impractical for debugging. I know this stream-behaviour from other work w/ Python, C, C++ (buffered IO). My solution was the print on stderr-stream.

This implementation makes its worse, even not the first loop prints are visible:

import sys

...
sys.stderr.write(my_log)

The more direct use by stderr doesn't give any output even when I call one debug by Python Shell.

Is there any trick to gain short reaction time from Poser machine by debug messages ?

TIA / Gunnar

 

PS: I read something about IDLE environment. Does it help? Is tutorial solution compatible w/ PP 2014 ?