From 292bfeb6224f70bf76a7b6881d17418008ad5264 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 20 Jan 2008 21:04:16 +0530 Subject: [PATCH] simple Tkinter app with always-on-top and transparency --- app.py | 20 ++++++++++++++++++++ rtm.py | 10 +++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 app.py mode change 100755 => 100644 rtm.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..c6775b5 --- /dev/null +++ b/app.py @@ -0,0 +1,20 @@ +# simple app + +from rtm import createRTM + +from Tkinter import * + +def createApp(rtm): + rspTasks = rtm.tasks.getList(filter='dueWithin:"1 week of today"') + tasks = [t.name for t in rspTasks.tasks.list.taskseries] + + root = Tk() + root.wm_attributes('-topmost', 1) + root.wm_attributes('-alpha', 0.5) + l = Label(text='\n'.join(tasks)) + l.pack() + l.mainloop() + +def test(apiKey, secret, token=None): + rtm = createRTM(apiKey, secret, token) + createApp(rtm) diff --git a/rtm.py b/rtm.py old mode 100755 new mode 100644 index e0eade4..c5a50e9 --- a/rtm.py +++ b/rtm.py @@ -201,7 +201,7 @@ API = { } -def test(apiKey, secret, token=None): +def createRTM(apiKey, secret, token=None): rtm = RTM(apiKey, secret, token) if token is None: @@ -210,7 +210,12 @@ def test(apiKey, secret, token=None): raw_input('Press enter once you gave access') print 'Note down this token for future use:', rtm.getToken() - rspTasks = rtm.tasks.getList(filter="due:today status:incomplete") + return rtm + +def test(apiKey, secret, token=None): + rtm = createRTM(apiKey, secret, token) + + rspTasks = rtm.tasks.getList(filter='dueWithin:"1 week of today"') print [t.name for t in rspTasks.tasks.list.taskseries] print rspTasks.tasks.list.id @@ -218,4 +223,3 @@ def test(apiKey, secret, token=None): # print rspLists.lists.list print [(x.name, x.id) for x in rspLists.lists.list] - -- 2.11.4.GIT