Forum: Poser Python Scripting


Subject: Breaking a SimpleXMLRPCServer with a keystroke

FVerbaas opened this issue on Dec 10, 2020 ยท 40 posts


adp001 posted Sat, 12 December 2020 at 12:04 PM

The thread example also works with an implementation of "dummy-threads".

Try this:

import 
    threading, 
    time

starttime = time.time() + 60

def test():
    print(time.asctime())
    if time.time() < starttime:
        threading.Timer(5, test).start()

test()

Run this. You should be able to use the console while in a 5 second interval something is written to the console (date/time). If nothing shows up, threads are there but not working. If you see something, you are able to use "threaded async".