Forum: Poser Python Scripting


Subject: Experience with communication between different instances of Python anyone?

FVerbaas opened this issue on Oct 28, 2017 ยท 28 posts


tromnek posted Wed, 06 December 2017 at 9:00 PM

The server needs to check the socket for a connection periodically. You should check frequently enough so that an incoming connection to the server doesn't timeout.

It's not that hard to 'not block' the rest of the system. I used tkinter's .mainloop() to 'not block' and scheduled periodic checking of the socket with tkinter's .after(time2scheduleCall, function2call)

However, like I said, Tkinter messes up things in Poser. I over came that by hijacking Tkinter. But Like I said, you need to hijack before any other Tkinter starts up.

Using threads would probably be better I think there are some wxPython functions that could also be used.