#!/usr/bin/env python """ TwitterGramCaster fetch driver script l.m.orchard@pobox.com http://decafbad.com/ Share and Enjoy """ import os, os.path, sys, time # HACK: Orient self with paths to local modules and config files self_path = os.path.abspath(os.path.dirname(sys.argv[0])) base_dir = self_path sys.path.append(os.path.join(base_dir, 'lib')) sys.path.append(os.path.join(base_dir, 'extlib')) import TwitterGramCaster shell = TwitterGramCaster.init(base_dir=base_dir) while True: try: shell.fetch() shell.process() shell.log.info("Sleeping for 60 seconds...") time.sleep(60) except KeyboardInterrupt: break except: pass