If any Python process is running, keep the screen on - Windows 11

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

If any Python process is running, keep the screen on - Windows 11

Message par Clippy »

If any Python process is running, keep the screen on - Windows 11
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: If any Python process is running, keep the screen on - Windows 11

Message par Clippy »

[https://github.com/wakepy/wakepy](https://github.com/wakepy/wakepy)

```
$ pip install wakepy

```

```
from wakepy import keep

with keep.presenting():
...

```

It [does](https://github.com/wakepy/wakepy/blob/main/src/wakepy/methods/windows.py) the same [thing @FranckDernoncourt did](https://superuser.com/a/1935422/28322) but is cross-platform and concise.

I always use `with keep.running():` because I'm not interested in imaging or progress-reporting, just need results of long computation.
Répondre

Revenir à « Windows 11 »