Advertising
Paste Description for sms2twitter
Posting incoming SMS messages to Twitter account on S60 smart phones using PyS60.
- sms2twitter
- Monday, June 29th, 2009 at 2:55:00pm MDT
- # Copyright (c) 2009 Andreas Schreiber <Andreas.Schreiber@dlr.de>
- import sys
- sys.path.append("e:\\Python")
- # PyS60
- import appuifw
- import e32
- import inbox
- # Twyt
- from twyt import twitter
- def message_received(msg_id):
- box = inbox.Inbox()
- sms_text = box.content(msg_id)
- appuifw.note(u"SMS content: " + sms_text , "info")
- api = twitter.Twitter()
- api.set_auth('python_demo', '*')
- api.status_update(sms_text)
- app_lock.signal()
- def quit():
- app_lock.signal()
- appuifw.app.set_exit()
- box = inbox.Inbox()
- box.bind(message_received)
- print "Waiting for new SMS messages..."
- appuifw.app.exit_key_handler = quit
- app_lock = e32.Ao_lock()
- app_lock.wait()
Paste Details
Tags: python sms smartphone pys60
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.