Personal thoughts on GUI programming

I have been programming for about 40 years. Going through a lot of different languages and programming paradims.

Lately most of my programming is done in:

So lately, after hitting some bugs in a recent update of the MATE desktop environment I decided to re-do my desktop set-up switching to a new desktop environment. After testing several desktop environments I decided for LxQt because of its minimalistic feel. While doing this, I figured, I needed some GUI scripts to spice things up.

In the past, most of these simple GUI scripts, I have done them in TCL/TK. So I am very familiar writting GUI applications using TCL.

Since, TCL is not a popular language (in a survey at the beginning of 2023 it wasn't even mentioned. On the other hand, python seemed quite popular.

I decided, that it probably would be a good idea to write these GUI scripts in python. Since, in python you can also get a tkinter module that seems to be quite ubiquitous. i.e. "batteries included" distributions have it, and most Linux distributions package it. Also, since is supposed to be a straight-port from TCL/TK I though that the learning curve would be pretty smooth.

So, I tried it using for a couple of scripts, a volume control and a [macro recording][xm] utilities.

I would have to admit that I find writting python3 tkinter GUIs very awkward. Because it is a direct translation of TCL/TK I keep thinking in TCL terms, but things do not work the same in python.

Because, it was easier for me, the other GUI utilities, local-startup and hk_helper were written in TCL

So, my conclusion is that while I can write GUI scripts in python, the learning curve is still steep, and I need to get a lot more experience before I can consider myself familiar with it.

Also, the decision to switch to tcl for the scripts that were eventually written in tcl, was driven not just for the familiarity, but because the use case required spawning new processes, which in tcl is far easier than in python.

Sometimes I think using a more pythonic GUI library instead of tkinter would be better. But, like I mentioned earlier, tkinter gets the job done, and can be found with python very often.