fohrloop / wakepy

Cross-platform keep-awake with python
MIT License
195 stars 14 forks source link

Include `on_fail="warn"` in the examples of the README / docs? #374

Closed fohrloop closed 2 months ago

fohrloop commented 4 months ago

Not all people read all the documentation. Adding on_fail="warn" in the examples, like this:

from wakepy import keep

with keep.running(on_fail="warn"):
    # Do something that takes a long time. The system may start screensaver
    # / screenlock or blank the screen, but CPU will keep running.

would make people notice the on_fail action flag. That's also a good default for applications that are used on multiple platforms, and would probably prevent unnecessary issues and save everyone's time.

fohrloop commented 2 months ago

I think this is not so acute anymore after the default on_fail action was changed to "warn" (in https://github.com/fohrloop/wakepy/pull/388). Perhaps better to keep the examples minimalistic. There parameter is documented already in the User Guide and in the API Reference.