odbc_installer / calldll: infinite loop encountered
theller at python.net
Thu Feb 6 08:52:49 CET 2003
[cc to the ctypes-users list]
"David" <dlashar at sprynet.com> writes:
> Hello. The module, odbc_installer, looks like the perfect solution for my
> need to make DSN entries (and otherwise make ODBC calls) via Python.
> Unfortunately, after loading calldll, npstruct, and dynwin, I can't get
> odbc_installer to import w/out errors. Typically what happens upon
> from dynwin import odbc_installer
> is that I get an error reporting that calldll does not have a 'load_library'
> atribute. When I subsequently import calldll directly, I can see that
> contrary to the error message, calldll *does* have a load_library attribute
> (and from what I can tell, no other public attributes). When, after
> importing calldll, I re-import odbc_installer, it loads, but it does not
> expose any of its functions (e.g., config_dsn); it exposes only the modules
> that it has imported, along with the INSTALLER_NAME global variable. This
> tells me that the import for odbc_installer is going only so far as the line
> user32 = windll.module ('user32')
> If I subsequently reload odbc_installer, or if I use a module that imports
> it (e.g., odbc_jet), Python launches into an infinite loop, giving the
> Exception exceptions.RuntimeError: 'maximum recursion depth exceeded in
> <bound method module.__del__ of <win32 module 'user32' (0 functions) >>
> I am running on Win2000 and am using the latest/current versions of dynwin,
> calldll, and npstruct. The problem is occurring on two of my machines, one
> running Python 2.2.1, the other 2.2.2. Thanks in advance for any
> help/suggestions. These modules look like a perfect solution for me, so I'd
> be delighted to get over this hurdle.
Would it be a good idea to port the odbc stuff from calldll to ctypes?
I would try to give all support I can, but I cannot do it alone.
More information about the Python-list