How can this script fail?

kdwyer kevin.p.dwyer at
Wed Aug 27 20:09:14 CEST 2008

On 27 Aug, 12:15, "boblat... at"
<boblat... at> wrote:
> On Aug 27, 1:08 pm, "M.-A. Lemburg" <m... at> wrote:
> > I don't think this is related to IDLE or your setup. The odbc
> > module is very old and unmaintained, so it's possible that Windows
> > doesn't find some system DLLs needed for it to work.
> Please note that
> 1) I can type "import odbc" directly into the IDLE shell without
> getting an error message,
> but only BEFORE I've run a script that tries to import odbc.
> 2) The same script runs fine under PyWin (which I don't like much as
> an environment).
> > If you're looking for a reliable Python ODBC interface, I'd suggest
> > you have a look at our mxODBC:
> Thanks, but I'm working on some kind of guerilla project of which my
> employer doesn't know, so they won't spend any money on a commercial
> product.
> robert


Your script works fine for me on my machine (Python 2.5.2, IDLE 1.2.2,

The two directories returned in the 'found in path' section are a
result of the .lower() method being called on the directory names in
the if statement.

So it looks to me as if IDLE/Python is not necessarily the problem.  I
notice that if I run a script from IDLE using F5 (this is what you're
doing, right?) the directory that contains the script is inserted at
the begining of sys.path.  Is there anything unusual in this
directory, particularly objects called 'odbc'?



More information about the Python-list mailing list