Native ODBC access for python on linux?

Thomas Bartkus thomasbartkus at comcast.net
Fri Jul 15 15:07:36 EDT 2005


<callmebill at gmail.com> wrote in message
news:1121446822.710877.312020 at g44g2000cwa.googlegroups.com...
> All,
>
> This info was very helpful, and I'm up and running with MySQLdb on
> linux, and the native ODBC support on Windows.
>
> One last question I have:  In vbs (specifically with .asp) I can make a
> connection to an ODBC provide _without_ the need to specify a system
> DSN in the Control Panel.  It's easy to do with MySQLdb.connect(
> host,user,pass,etc), but is this possible with the ODBC module in
> Python on win32?
>

Ahhh - But that's the point!

If you are "up and running with MySQLdb on linux" then you should be up and
running with with the same code on Windows.  The exact same Python script
you run on Linux will work for you on windows!  I *think* you might be able
to attach the ODBC driver but it would be a complication and an unnecessary
one at that.  Just point MySQLdb.connect() at the servers IP address.

Go to SourceForge and download  the MySQLdb installation for win32
[MySQL-python.exe-1.2.0.win32-py2.4.exe].

Sometimes you can't believe it because it's too easy :-)
Thomas Bartkus





More information about the Python-list mailing list