RemindMe [Python] - Programming On Unix

Users browsing this thread: 2 Guest(s)
deadgone
Long time nixers
A small script that reminds you to do something in a set amount of time.

Deps: blessings

Code:
#!/usr/bin/python2
from blessings import Terminal
from sys import argv
import os
#import time

try:
  script, remindx, timex = argv
except ValueError:
  print "./remindme \"USE QUOTES\" 4 (secs)"
  quit()
count = 0
t = Terminal()
#timex = int(timex)
os.system("sleep %r" % timex)
#time.sleep(timex)

print t.clear_eol + t.move(0, 60) + t.standout + t.red + ('REMINDER:') + t.normal + t.blue +  " " + t.blink(remindx)
venam
Administrators
You can try to call os.system and send a message through notify-send "the message here".
I don't know if it's a better idea.
deadgone
Long time nixers
(04-09-2012, 04:59 PM)venam Wrote: You can try to call os.system and send a message through notify-send "the message here".
I don't know if it's a better idea.

Yeah. But I wanted this to be a command line app.

Like, you'ed be programming and stuff, and a reminder would pop up on the top left of the terminal.

But I might use this in other projects though. :)
deadgone
Long time nixers
(04-09-2012, 07:19 PM)NeoTerra Wrote: This is neat, thanks!

You're welcome! :D

If you want to fork it and change some stuff here is a link: https://github.com/Gregoryx12/snippets
TheHotBot
Long time nixers
Nice.
Will try it when o get home!
"TheHotBot" Aka NeverW8!

I can be seen on the IRC from time to time :)