Re: Dealing with Excel
Robert Hicks wrote: I need to pull data out of Oracle and stuff it into an Excel spreadsheet. What modules have you used to interface with Excel and would you recommend it? Robert http://sourceforge.net/projects/pyexcelerator/ http://sourceforge.net/projects/pyxlwriter/ We use the latter one in the past. As long as your output is plain enough. It's effective and MS-free. The former should be more powerful. Not tested here. Hope this helps Francois -- http://mail.python.org/mailman/listinfo/python-list
Re: MS SQL Server/ODBC package for Python
Hi Peter Running your benchmark, I ran into a couple of interesting points. Using mx.ODBC, my times were 0.54 seconds and 6.56 seconds respectively, while using adodbapi my results are 3.55 seconds and 25.9 seconds respectively. mx.ODBC is faster with the simple query you provide. We agree on figures at this stage :) Next I modified the benchmark to reflect my particular circumstances more accurately [...] reduce the number of iterations from 100 to 10. Since there are 128000 records in the main table, the wait for 100 iterations was too long for my patience. Under these circumstances, mx.ODBC's numbers are 188.49 seconds and 377.56 seconds respectively, and adodbapi's times are 111.15 seconds and 223.55 seconds respectively. This is an interesting feedback. It looks like both middleware have their distinct value and distinct set of advantages. I'll definitely review my judgment on ADO! My first wall-clock impressions are obvious exaggerations of reality, for which I duly apologize to all. However, adodbapi did prove to be faster in my admittedly very wacky common use case. Slower to connect, but faster to run a substantial query. Comments? Questions? Suggestions for improvement? Based on your results, my feeling is that mx.ODBC remains a solution of choice for db-support behing web services à la mod_python where connection time is essential whilst adodbapi would be the definite winner when it comes to typical db-intensive win32-based applications (such as wxpython-based ones). Regards to you Francois -- http://mail.python.org/mailman/listinfo/python-list
Re: MS SQL Server/ODBC package for Python
Peter, May my I apologize for knocking against your information, as well. For what it is worth, my experience is as follows: Using a PIII 550MHz, 256MB RAM, running WinNT 4.0 and Python 2.3.4 and connecting to a Sybase Adaptive Server Anywhere 8.0 database, mx.ODBC took approximately 8 wall-clock seconds to connect As a long time user of the ASA range of products, I was surprised by your connection time to ASA 8. I'm not a regular user of mxODBC but i have tested it with success here. With no pending time upon connection whatever the middleware. The script below ran fast on my machine (an oldish pentium 400) with ASA 8.0.2 (the engine is local). When re-cycling ASA connection (a good practice) the script took 0.21 sec. to run and 3.4 sec. when re-building the connection on every hit (which you should avoid). For 100 connections, not one! Which confirms my feeling that something got in the way when you ran your test. mxODBC is fast and safe (on both linux and win32). I won't comment on ado since i'm not a user. But the fact that ASA+mxODBC runs multi-platform may be an additional advantage. Regards Francis from mx import ODBC import time mytime=time.time() print 1 connection and 750 cursors started, used and closed at once... dbHandle=ODBC.Windows.Connect(descriptive demo fr,dupont,,0) for i in range(100): cHandle=dbHandle.cursor() cHandle.execute(select 1) cHandle.fetchall() cHandle.close() print time.time() - mytime print 750 connection fully started, used and closed at once... for i in range(100): dbHandle=ODBC.Windows.Connect(descriptive demo fr,dupont,,0) cHandle=dbHandle.cursor() cHandle.execute(select 1) cHandle.fetchall() cHandle.close() dbHandle.close() print time.time() - mytime -- http://mail.python.org/mailman/listinfo/python-list