While I was working on my first GNOME application which I hope to publish soon I stumbled a small hindrance of how to spawn a subprocess efficiency without blocking the main thread. I could have leave it as is with the straightforward pythonic way but I wanted the user interface to be fluent.
If you are using a recent version of Python (which you should because Python 2 will be EOL in less than a year) than you can use type hinting with a sane syntax instead of using docstrings to document the arguments types.
In my previous post Getting Started With Vala I showed you how to
write a program in Vala and compile it using
valac. Compiling with
valac was okay but even with only GTK+ as our dependency the command
is starting to get long. If you don’t want to specify all the compiler
flags each time you can use a build system.
Vala is an object oriented programming language that was designed specifically for GTK+ and GNOME development. Vala’s syntax is similar to C# but it compile to C code using the GObject system which let you use the GNOME ecosystem easily.