[jToolkit-cvs] jToolkit/data _PyADO.py,1.3,1.4
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2004-03-09 21:49:13
|
Update of /cvsroot/jtoolkit/jToolkit/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8983 Modified Files: _PyADO.py Log Message: Changed to more robust way of getting the classname. Generating ADO shortcuts cannot use a GUI progress under Apache, so it has been changed to use a simple progress Index: _PyADO.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/data/_PyADO.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _PyADO.py 9 Mar 2004 21:20:20 -0000 1.3 --- _PyADO.py 9 Mar 2004 21:23:37 -0000 1.4 *************** *** 37,46 **** print "creating jToolkit.data.ADODB class library to speed up database operations..." conn = win32com.client.Dispatch("ADODB.Connection") ! version = str(conn.Version) ! classname = "Microsoft ActiveX Data Objects %s Library" % version pyclassfilename = os.path.join(os.path.dirname(__file__), 'ADODB.py') pyclassfile = open(pyclassfilename, 'w') print "creating %s for %s" % (pyclassfile, classname) ! makepy.GenerateFromTypeLibSpec(classname, pyclassfile) pyclassfile.close() if not os.path.getsize(pyclassfilename): --- 37,45 ---- print "creating jToolkit.data.ADODB class library to speed up database operations..." conn = win32com.client.Dispatch("ADODB.Connection") ! classname = sys.modules[conn.__class__.__module__].__doc__ pyclassfilename = os.path.join(os.path.dirname(__file__), 'ADODB.py') pyclassfile = open(pyclassfilename, 'w') print "creating %s for %s" % (pyclassfile, classname) ! makepy.GenerateFromTypeLibSpec(classname, pyclassfile, progressInstance=makepy.SimpleProgress(0)) pyclassfile.close() if not os.path.getsize(pyclassfilename): |