Forum: Poser Python Scripting


Subject: Breaking a SimpleXMLRPCServer with a keystroke

FVerbaas opened this issue on Dec 10, 2020 · 40 posts


adp001 posted Fri, 11 December 2020 at 8:59 PM

MD has nailed the Python interpreter to one thread only. I assume the reason is that a running Python-Thread is able to "inspect" what MD is doing (re-engeneering). Seems that is the reason why they canceld UI-support too (UI needs an event-loop).

Poser up to version 9 did that too. The only chance was to use Poser-Pythons "callback" (called every time something happens in the UI, and generates "empty" events too – kind of a so called heartbeat).

Timeout can't work in such a scenario, because a timeout-loop would require event notifications (at least a timer able to interrupt a process). Python does no polling in the standard libs. I had to rewrite some parts of Pythons libs too to get Poser 9/10 running with standard async TCP libs and Posers "callbacks".