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 hashes)