GUIs with Python



Up until now, I’ve been using TKinter as the basis for writing any GUI’s with Python. It hasn’t been ideal. The PySimpleGUI looks like a much better, quick and easy solution to getting a GUI up and running. Check the github page below for a full set of demos. I will be updating my teaching notes in due course to use PySimpleGUI instead of raw TKinter.

You can even use PySimpleGUIWeb to run your PySimpleGUI programs in your web browser!

What demos should I provide in my teaching notes for GUI’s when I re-write them?


Although it’s not technically a Python GUI, I think teaching how to use a basic python webserver (http.server?) with an HTML frontend would be something useful to teach. You could perhaps also touch on using REST that way. I guess this approach means students already need to know both Python and HTML, perhaps some JS too.


Actually you are right on the money Paolo. The reality for modern real-world applications a web front end is the go to option over the classic GUI. It is the true universal interface. The main hassle for building web servers with early programmers though is, as you suggest, that it requires familiarity with multiple technologies simultaneously. To do anything non-trivial would need a good understanding of Python, Javascript, HTML, CSS, possibly SQL, as well as session and state management issues.

That said, I do have some notes for using Python’s Flask webserver library and updating those notes is on my to-do list. I doubt many students pre-Diploma would venture into web serving though.


Oh yes, Flask would definitely be nice to learn about. I’ve tried that and Django but never really understood how to use it properly (and I have an in-house Python webserver I’ve used for a while).