Trio with TKinter UI?

Aloha, I have been using Trio on a raspberry pi data acquisition/control system for a year or so. Trio gives the server side nice async threads for dealing with odd sensors, etc. The client side was built using GTK/GObject and didnt use trio. I’m having to redo the client with the TKinter UI library for irrelevant issues. I was looking into threading for the UI vs network comms and thought I’d try using trio there. I found the triotk library ( which is over 3y old and apparently built against very old Trio. It uses a nursery.spawn method, which does not exist in current trio.

Are there other options/examples of using trio with tk?

Trio just recently released support for “guest mode” which provides a much nicer GUI integration story. It looks like has an example of using it with Tkinter, but I haven’t tried it myself.

nursery.spawn() hasn’t existed since Trio 0.1.0. If you do want to use triotk, you can probably update it fairly mechanically by combing through the Trio release notes for all the name changes that have occurred since then. For example, spawn() is now called start_soon(). (But try guest mode first – you’re likely to have a better experience with it.)