I have tried to create a cross-platform (for now Linux (over D-Bus interfaces of various daemons) and Windows are supported) lib for inhibiting entering powersaving mode. You may want to use it.
https://github.com/KOLANICH/NoSuspend.py/blob/master/NoSuspend.py
I have tried to create a cross-platform (for now Linux (over D-Bus interfaces of various daemons) and Windows are supported) lib for inhibiting entering powersaving mode. You may want to use it. https://github.com/KOLANICH/NoSuspend.py/blob/master/NoSuspend.py