Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4848

Beginners • Re: Apparent conflict between tkinter and gpiozero

$
0
0
Use the import as to rename it.

So
from gpiozero import Button as gButton
Or
from tkinter import Button as tButtton

Or any name you want to use, make it easy to remember, use find and replace before you merge.

The hardest part will be rewriting your gpiozero into the tkinter style.
Most while loops will be thrown out etc.


---

Here was my quick go at getting something similar working (sensehat is your gpio, guizero is your tkinter)
viewtopic.php?t=202386#p1263308
May be easier here, no idea how they managed to loose me as the creator and someone else on github, but hey ho
https://github.com/lawsie/guizero/blob/ ... ad_data.py

Statistics: Posted by bensimmo — Sun Jul 21, 2024 6:36 am



Viewing all articles
Browse latest Browse all 4848

Trending Articles