Hi Vladyslav,
It’s not possible to create a GUI using embedded Python actions. The issue is that the GUI code needs to control the application’s main loop, but MWServer itself already does that, and they can’t be made to work together.
One way around this would be to use Python’s multiprocessing module to run the GUI code in a separate process. The Python code running in MWServer would launch the process and exchange needed data with it.
Another option might be to use MWClient’s Python Script Bridge instead of server-side actions. That’s the intended use of the example code your referenced; it won’t work inside MWServer. There’s a bit more info on how it works in this discussion.
Cheers,
Chris