Then you can use the Inhibit() and UnInhibit() DBUS methods built into the newest versions of GNOME Power Manager. Here is a simple demonstration in python:
Orduan erabil ditzakezu GNOME Energia-kudeatzailearen bertsiorik berrienetako Inhibit() eta UnInhibit() DBUS metodoak. Hona azalpen sinple bat python-en: