Pardon the really terrible pun - but I'm working on a small side project on a Raspberry Pi in Python.
Ok, now that we got the Pi jokes done, here's what I'm doing:
I'm a building an station display (board) for nearby train and other public transprt stations with real-time data and more importantly potential delays. Idea is to have a brief glance at it before leaving the house, so you know whether to rush or leisurely stroll to the station.
For that I'm re-using and old PI (3B+ to be precise, not really the fastest one) with a Raspberry Touch Display 2 and a bit of Python code.
So easy do develop (in PyCharm) and test (on my PC), then "stage" it to a Raspberry OS within a virtualbox, and then deploy to a real bare metal RaspPi.
I get the data from the ÖBB online timetable (as json) and the Wiener Linien open real time data (german description here). I chose those 2 because that's really all I need in my neighborhood. ÖBB (the Austrian federal railways) timetable covers all train journeys within Austria, and as I'm living in Vienna, I only need the Vienna public transport timetable. *
For the GUI I started the tkinter but started to regret this almost immediately. It is a terrible API without proper control for tables for example - and yes, showing an online timetable needs a proper table - it's sort of in the name.
When I then first deployed this to a real Raspberry the performance was abysmal - and I'm talking about fetching the data from their soures, but presenting that data (once loaded) in a tkinter window/table.
Think of old terminals connected via a serial V.32bis modem... where you can watch the lines being popuplated - almost that bad. You could see the table being drawn... really.
So, terrible API, hardly control over table formatting, terrible performance on the target HW, lets look for a different GUI library.
PyQt to the rescue. I found the API and the constructs more familiar (from Swing, Android, even back OS/2 and Windows ;)) and it is definitely more performant.
So PyQt it is. Rewrite was done in less then an hour. No visible rendering/drawing artifacts.
Right now, the configuration of the stations is right still in the source code (yuck), but that's the next step then - one needs to fill their spare time, right?
More to follow.
---
* yes, my code is modular enough to plug-in any other transport provider as long as they have machine readable online timetable data via whatever over HTTP without logins ;)





