Last active
July 19, 2016 01:17
-
-
Save natanielstrack/01d8611ead76c521103ad76f2774dc3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sched, time, sys | |
from pync import Notifier | |
try: | |
seconds = int(sys.argv[1])*60 | |
text = sys.argv[2] | |
def showNotifier(): | |
Notifier.notify(text, title="Reminder", sound="default") | |
def setReminder(): | |
s = sched.scheduler(time.time, time.sleep) | |
s.enter(seconds, 1, showNotifier, ()) | |
s.run() | |
setReminder() | |
except IndexError: | |
print 'ops, no parameters specified' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pip install pync
python remainder.py 10 "remember the milk" &