#PyGObject

2025-06-12

Trying to understand how to fully leverage GNOME Workbench for GTK app development on Linux. Docs and examples seem sparse. How do you use Workbench effectively in your workflow? Any tips or best practices?

You have a #Gtk4 application, written in python with #PyGObject, which use a template to build a window.
If you define a callback in code but you do not use it in template, an exception is raised.
If you use a callback in template which is not defined in code, no errors are reported.
But.
CSS classes are not applied to widgets. 🤷

Look:
With the callback:


Without the callback:


I lost some good hours trying to find why my button was not styled.

#Gtk 4.16.5

2024-09-18

A mixture of cos(), log(), 3 x floor(), 3 x sign().

It looks better than it sounds ¯\_(ツ)_/¯

#sound #PyGObject #synth #spectrum

2024-07-16

Is there anyone who is interested in taking over maintenance of this lovely chess timer app for #GNOME written in #Python? It's pretty cool (and a member of GNOME Circle!), but its maintainer, the wonderful Clara Hobbs, is stepping away from the project. If this sounds interesting to you, reach out to them!

gitlab.gnome.org/World/chess-c

#GTK #PyGObject #GNOMECircle

2024-06-17

Awesome update and progress by GNOME GSoC student @atbrat on porting Workbench demos to Vala

medium.com/@bharat.atbrat/gsoc

Vala took the lead over Python 😉

Thanks to @lw64 and @dimmednerd for reviewing

#GNOME #GSoC #Vala #GTK #pygobject

A screenshot of Languages usage in the demos repository.

Vala is at 30.6%
Python is at 28.7%
JavaScript 28.5%
Rust 11.1%
Other 1.1%

Vala took over Python recently.A screenshot of the number of demos ported for each language.

JavaScript is at 99
Python is at 92
Vala is at 92
2024-03-08

Is this Python diagnostics coming to Workbench 46 ? :python: :gnome:

Why yes it is!

Collaborative effort with @janvhs and @capypara 🙌

We are using pylsp and Ruff.

I'm also very excited to share that all 100+ demos have been ported to Python. Thanks to all contributors!

#Python #gtk #pygobject #development #GNOME

A screenshot of Workbench with 2 panels.

The right panel shows the Preview.
The left panel shows Python code.

The token "ok" is underline in red and there is a tooltip saying

"Undefined name 'ok'"
Jeff Fortin T.nekohayo
2024-02-10

Oh cool, the new documentation website actually lists known apps around the platform, & there are more than I thought, even among the new crop of + apps! Some of those I had never suspected were Python.

It's encouraging to see continued adoption of that elegant language. I want more apps to be written in Python+GTK, they lower the barrier to entry for newcomers in .
gnome.pages.gitlab.gnome.org/p

2023-10-26

Python support just landed in Workbench 🎉

:python: 🛠️ :gnome:

Thanks and credits to @capypara !

#Python #gtk #GNOME #pygobject #libadwaita

Paolo Melchiorrepaulox@fosstodon.org
2023-09-20

GNOME Python binding 👣🐍

PyGObject changes for GNOME 45:
- drop GTK2 and Python 3.7 🧽
- support Python 3.12 ✨
- GTK4 and Libadwaita documentation 📚

Info 👇
release.gnome.org/45/developer

#Gnome45 #Gnome #Python #PyGObject #FreeSoftware #ReleaseDay #Gtk4 #Libadwaita

CC @gnome

mgorny-nyan (he) :autism:🙀🚂🐧mgorny@treehouse.systems
2023-08-29

#Python experts & #PyPy lovers: we'd use help figuring out why #pygobject is broken with PyPy 3.10. The level of abstraction in that package gives me a vertigo.

gitlab.gnome.org/GNOME/pygobje

#Gentoo

mgorny-nyan (on) :autism:🙀🚂🐧mgorny@pol.social
2023-08-29

Eksperci Pythonowi & miłośnicy #PyPy: przydałaby nam się pomoc w ogarnięciu, dlaczego #pygobject się sypie z PyPy 3.10. Poziom abstrakcji w tym kodzie powoduje u mnie zawroty głowy.

gitlab.gnome.org/GNOME/pygobje

#Gentoo #Python

francisco@localhost:~$ 🐧fcoarias@vivaldi.net
2023-07-09

El fin de semana estuve trasteando con el #PinePhone. Mi ideal inicial era empezar cargando #Mobian pero no hubo caso, no booteaba. Decidí pasar a #Manjaro con #Phosh: va bien fluida.

Mi intención es evaluar cuál es el mejor entorno para desarrollar entre #Phosh y #PlasmaMobile.

Para #Phosh estoy probando #PyGObject y para #PlasmaMobile #Kirigami.

Hasta el momento #PyGObject es como todo lo relacionado a #Python: cumple con lo que promete. Necesito trabajar más con #Kirigami 😅

btw, #gtk4 and #libadwaita with #PyGObject it's a pain.
2022-05-03

Dear #Python community,

how do you usually address „No module named gi”?

I have it time and again that #pygobject breaks for me and renders certain applications unusable (in this specific case: #kupfer)

Risyad Raisatmorojo
2021-11-24

GtkAppWindow.maximize() to maximize your window.

Risyad Raisatmorojo
2021-11-24

Want to change a value in the row? store.set(iter, column_number, "new Value")

Risyad Raisatmorojo
2021-11-24

What if you want to change a data inside the liststore? You can iterate through the rows inside the store, and treat it like any other list. So to get a data stored in 6th column, you can access it with row[5]. Although I'm not sure if you can change it's value with a simple assignment like row[5] = 'new val'.

Risyad Raisatmorojo
2021-11-24

To add data to liststore you can .append(data). Then choose the model from treeview to connect between treeview and the liststore. Then connect between cellrenderer to what row from the liststore you want to render.

Does my words even make sense? And here I thought that pygobject's documentation is hard to understand lol writing documentaries are hard.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst