# Trio with TKinter UI?

**URL:** <https://trio.discourse.group/t/trio-with-tkinter-ui/319>\
**Category:** Help and advice\
**Created:** [July 22, 2020, 7:21am UTC](https://trio.discourse.group/t/trio-with-tkinter-ui/319 "2020-07-22T07:21:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauijerry](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/mauijerry/32/131_2.png) [@mauijerry](https://trio.discourse.group/u/mauijerry)\
**Post date:** [July 22, 2020, 7:21am UTC](https://trio.discourse.group/t/trio-with-tkinter-ui/319/1 "2020-07-22T07:21:56Z")

</div>

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 ([https://github.com/Akuli/triotk](https://github.com/Akuli/triotk)) 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?  
Thanks!

---

<div class="post-metadata">

**Author:** ![oremanj](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/oremanj/32/106_2.png) [@oremanj](https://trio.discourse.group/u/oremanj)\
**Post date:** [July 23, 2020, 4:38am UTC](https://trio.discourse.group/t/trio-with-tkinter-ui/319/2 "2020-07-23T04:38:58Z")

</div>

Trio just recently released support for “guest mode” which provides a much nicer GUI integration story. It looks like [https://github.com/richardsheridan/trio-guest/blob/master/trio\_guest\_tkinter.py](https://github.com/richardsheridan/trio-guest/blob/master/trio_guest_tkinter.py) 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.)
