I don't know what the bug is, but I don't think it is pyodbc. I use
it every day for Windows services, but I just tried your test and I
get different results.
In my case, I get an error because the decimal module wasn't found.
This is covered here:
http://code.google.com/p/pyodbc/wiki/py2exe
and is easily fixed using this:
import py2exe
from distutils.core import setup
setup(console=["test.py" ],
options = { "py2exe": { "includes": "decimal, datetime" } })
Here is the contents of my dist directory. Make sure pyodbc.pyd is in
there.
10/02/2009 20:42 71,168 bz2.pyd
6/10/2010 17:00 1,552,234 library.zip
4/16/2010 13:33 74,240 pyodbc.pyd
10/02/2009 20:41 2,140,160 python26.dll
10/02/2009 20:43 11,776 select.pyd
6/10/2010 17:00 18,944 test.exe
10/02/2009 20:42 585,728 unicodedata.pyd
10/02/2009 20:40 49,664 w9xpopen.exe
The script I used was:
import pyodbc
I also tested by actually using pyodbc and that worked also.
I suspect it isn't getting the correct test.py or something of that
nature.