Python Forum
Help for my first Python project!!!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help for my first Python project!!!
#1
Hi all,

I am new in the forum, and new in Python programming too... I have read many good things about Python, but I never had the opportunity to do something nice with it.

I am currently working on a score board for my table soccer. My project involves an Arduino sending characters (R for red goal, and B for blue goal) via MQTT to a Raspberry. The communication works, and I can see the character on the Raspberry, using a Python script.

Now I would like to create an interface, but I need your support. For this step, it would be ok a single page with a reset button, and the score, updated when Arduino sends a signal.

In the future, I would like to create something bigger, with tournament management, player selection, database, replay with Raspberry Pi cam, and many other features.

I would create a desktop application, but maybe a web application it would be simpler. What do you think?
Moreover, in case of a desktop application, can you suggest me a good framework to implement the GUI, possibly with plent of tutorials and examples?

Thank you,
Francesco
Reply
#2
Hello and welcome to Python and the forums!

Your project sounds interesting and it's nice to see you decided to take the Python route :)

When it comes to functionality, as long as you only need simple displaying of scores, it doesn't really matter whether it's a desktop or web app, IMO. Speaking of that, how do you (plan to) display the app? Will you hook up a monitor? Or remote connect to RPi?
In case you don't (want to) have a monitor available, a web app might be a better choice, since you could view the page from any device with wifi connectivity (phones, tablets...). And that reminds me, if you already have some web development skills, that will probably make it even easier for you.

If you decide to go with a desktop interface, there are a couple of options.
PyQT is one of most popular (if not the most popular) Python GUI frameworks. I would make sure to read about the licensing if you plan to use it commercially, since I think it has some quirks (or at least the QT C++ library has). Maybe someone else on the forums can provide better help on that.
You will find Tkinter framework all over with hundreds of tutorials and references (which in a way is a plus)... But it is an old framework, sometimes employing far from modern style of making GUIs, so I wouldn't recommend it.
wxPython is quite a mature and relatively modern framework with also some nice tutorials and references, I suggest you to look into it.
Kivy is arguably the simplest one to use, and rather nice looking too. Kivy app can also be compiled to work on Android with buildozer, maybe even on iOS with some effort. But I would suggest checking into support for Raspberry Pi first... I know there was a lot of pain with Kivy on Raspberry Pi, I suppose because of the OpenGL drawing backend that it uses...
PyGame is another nice option, very mature with many learning resources as well. But maybe a bit of an overhead for what you require.

That was a high level description of what I know... But feel free to ask more specific questions (we also have a GUI subforum). There are many folks on this forum who are very knowledgeable on the frameworks I mentioned + a lot more :)

Good luck!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020