import twitterimport osfrom time import sleepfrom pipes import quoteapi = twitter.Api(consumer_key='',consumer_secret='',access_token_key='',access_token_secret='',input_encoding='utf-8')sid_file = open('/home/familab/sid.famduino','r+')cache_sid = sid_file.readline()if cache_sid == "":sid = 0else:sid = int(cache_sid)print "Current sid: "+str(sid)sid_file.close()replies = api.GetReplies(since_id = int(sid))for item in replies:print item.idif item.id > sid:sid = int(item.id)sid_file = open('/home/familab/sid.famduino','w')sid_file.write(str(sid))sid_file.close()print "New sid: "+str(sid)os.system("flite -voice rms -t "+quote(item.text))print item.text