#python #now lets create an instance of this class import os def setup_ld_library_enviroment(): print "setting up LD_LIBRARY_PATH ..." if not "LD_LIBRARY_PATH" in os.environ.keys(): print " no LD_LIBRARY_PATH set. Setup new..." os.environ["LD_LIBRARY_PATH"]="." else: print " current LD_LIBRARY_PATH: ",os.environ["LD_LIBRARY_PATH"] print " appending path... " if not os.environ["LD_LIBRARY_PATH"].endswith(":"): os.environ["LD_LIBRARY_PATH"]+=":" os.environ["LD_LIBRARY_PATH"]+="." print " final LD_LIBRARY_PATH : %s \n\n "%os.environ["LD_LIBRARY_PATH"] #context.register_util(HelpUtil()) if __name__ == "__main__": print "main is main!" setup_ld_library_enviroment() from ccdb.cmd import ConsoleContext import sys context = ConsoleContext() #set up connection string if "CCDB_CONNECTION_STRING" in os.environ.keys(): context.connection_string = os.environ["CCDB_CONNECTION_STRING"] context.register_utilities() context.process(sys.argv) """ ======= import ccdb import ccdb.cmd ccdb.haha() import re preg="(?P^[0-9])*(?P[0-9a-zA-Z_]+)(\\((?P.*)\\))*"; m = re.match(preg, "5hereSpec(45)") print m.groups() if(m.group("times")): print "num times ",m.group("times") if(m.group("type")): print "num type ",m.group("type") if(m.group("name")): print "num name ",m.group("name") x = 5; y = 5 + m.group("name") print y m = re.match(preg, "hereSpec") print m.groups() >>>>>>> .r7145"""