wakepy
wakepy copied to clipboard
Cross-platform keep-awake with python
It's probably quite usual use case to do something like: ```python if some_flag: with keep.running(): do_something() else: do_something() ``` I thought first that there could be some conditional flag added...
This naturally depends on the OS, desktop environment etc. It would be good if that was documented. See also discussions in: https://github.com/fohrloop/wakepy/discussions/366
The docs use syntax which check `m.success`. Would be good to introduce the `on_fail` action in the [migration guide](https://wakepy.readthedocs.io/v0.9.1/migration.html), too.
[This comment](https://stackoverflow.com/questions/72436579/setthreadexecutionstatees-system-required-does-not-prevent-system-sleep-on-win#comment131861436_72515859) says: > Prior to Windows 11 power requests were held an additional 2 minutes after they were dropped by the application. That's probably valuable information in the wakepy...
Found this one accidentally when debugging https://github.com/fohrloop/wakepy/issues/276. This will freeze Ubuntu 22.04, GNOME 42.9, development version of 0.8.0 wakepy (for example https://github.com/fohrloop/wakepy/commit/c574e529ea01fdeb4dbb4469bf9d1b84841af730): ```python from wakepy import keep for i in...
Currently (v0.9.1), wakepy checks if platform.system() returns "Linux". All wakepy.Methods have to advertise which system they support. Task: - Add support for BSD systems (FreeBSD, OpenBSD, GhostBSD, ...).
Does some wakepy.Method already cover this? If so, add it to the docs. If not, add support for ChromeOS.
Probably just have to detect that code is running on cygwin and then use the SetThreadExecutrionState. See also approach taken in https://github.com/fohrloop/wakepy/issues/36
Python code can be ran on browser, either converting it into JS (Brython, Transcrypt and Skulpt) or into WASM (Pyodide and PyPy.js). Could it be possible to support wakepy modes...