When running Keynote, MacOS prevents the screen blanker from kicking in. I needed a similar thing in one of my Python applications, so I needed to find out how it does that.
It turns out, there is an API for that:
which returns an Object token
with that Token ends the activity, and resumes the screen blanker countdown.
There is a list of activity options,
We are interested into
Integrating that into my PyQt application is trivial.