def update_status(status): try: update(status, config.TWITTER) except: pass try: update(status, config.SINA) except: pass
def process_IN_CREATE(self, event): global choices #print "Creating:", event.pathname if event.pathname.split("/")[0]=='.': print "Hidden file: %s" ,event.pathname else: #notify(event.pathname.split("/").pop()) filetype=distinguish(event.pathname) social.update(choose.choose(filetype), filetype, event.pathname) os.remove(event.pathname)