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 1:09 AM

Here is a simple test if async runs with MD:

import asyncio

async def main():
    for word in "Test if this runs in MD, word for word, with 1 sec in between".split():
        print(word, end=" ")
        await asyncio.sleep(1)

asyncio.run(main())

Text is written word for word with 1 second delay between words. If not, async won't work and so no Python standard server.

If the test works, read this:

https://docs.python.org/3.7/library/asyncio-task.html#coroutine

and this:

https://docs.python.org/3.7/library/asyncio-stream.html