No project description provided
Project description
bedtime
Python library for doing something when it's almost time for bed (the computer is going to sleep, or turning off).
import time, bedtime
def do_log():
with open("./test.log", "a") as f:
f.write("i went to sleep\n")
sleeper = bedtime.Listener(on_sleep=do_log)
while True:
time.sleep(1)
# later, after lights out...
# test.log <
# i went to sleep
TODO:
- Windows
- MacOS
- Linux (maybe usually the same as MacOS?)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Bedtime-0.0.3.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Bedtime-0.0.3.tar.gz.
File metadata
- Download URL: Bedtime-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e3db3986f05521a73b91870ec8a83ed0ecfa1767378ee7a6d92b72a919038f7
|
|
| MD5 |
1aed97d56ae7f422ef741afd0dd845f5
|
|
| BLAKE2b-256 |
cf0e027e60ea2b86e93cdd7a7c1b5f7f737eb6cdd90a612fa4bfa6310b58487a
|
File details
Details for the file Bedtime-0.0.3-py3-none-any.whl.
File metadata
- Download URL: Bedtime-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c887959874e55f782765dcb094c13dcad9f2bf081e15df73829aef90111b80
|
|
| MD5 |
ebc40d12e8ef1277ff5066c2d9335295
|
|
| BLAKE2b-256 |
6c52e652eb9e03ea1f1bcc3deff75d8345b9a5e15b0a89c5a144333d23580dfb
|