#!/usr/bin/env python """ $Header: /cvsroot/dbagg3/bin/dbagg3,v 1.3 2004/08/06 02:04:26 deusx Exp $ """ import os, os.path, sys ########################################################################### # HACK: Orient self with paths to local modules and config files self_path = os.path.join(os.getcwd(), __file__) self_dir = os.path.dirname(self_path) if self_dir.endswith('bin'): self_dir = os.path.join(self_dir,os.path.pardir) os.chdir(self_dir) # If calling root dir script sys.path.append(os.path.join(self_dir, 'lib')) # If calling script from bin/ sys.path.append(os.path.join(self_dir, os.path.pardir, 'lib')) # HACK: Include modules found on my laptop if (os.path.isdir('/Users/deusx/local/lib/')): sys.path.append('/Users/deusx/local/lib/python') sys.path.append('/Users/deusx/local/lib/python2.3/site-packages') ########################################################################### import dbagg3.cli if __name__ == '__main__': dbagg3.cli.main()