class Session: #System.setOut(sys.stdout); def __init__(self): self.pi=ScriptsInterface() def __connect__(self,user,password,server,port,dsn): try: self.pi.openConnection(user,password,server,port,dsn) except ClassNotFoundException ,cnfe: print "class not found: %s " % str(cnfe) raise SystemExit except InstantiationException ,ie: print "InstantiationException: %s " % str(ie) raise SystemExit
def __init__(self): self.pi=ScriptsInterface()