Native ODBC access for python on linux?

Thomas Bartkus thomasbartkus at comcast.net
Thu Jul 14 22:00:53 CEST 2005


<callmebill at gmail.com> wrote in message
news:1121364222.540501.198600 at g14g2000cwa.googlegroups.com...
> I'm getting my feet wet with making Python talk to MySQL via ODBC.  I
> started on Windows, and it went smoothly enough due to the ODBC stuff
> that apparently is native to Python at least on windows (I've been
> following ch. 13 of Mark Hammond's py on win32 book).
>
> But now I'm trying to do equivalent stuff on linux (Fedora Core 3) with
> python 2.3.5 and mysql.  I'd like to stick with packages that are
> native to python, rather than relying on external stuff (e.g., MySQLdb
> and mxODBC).  Is this possible, or do I have to use 3rd party pieces to
> use ODBC with Python under linux?
>
>
> As an aside, I've only used ODBC to access db's, period.  I've never
> used, for example, MySQL's API for working with a MySQL db.  I'm
> curious to see what that looks like, if anyone has any examples
> (python, c, or otherwise).
>
> Thanks in advance for any help.
> -Bill

We have a Linux/Apache/MySQL server.  We use the ODBC driver to write
Windows clients using VB.  I only understand ODBC as a means to bring the
Linux/Apache/MySQL to speaking terms with the Microsoft world. ODBC serves
as the translator between these 2 alien systems.

Although I hear rumors about ODBC drivers on Linux, I confess I don't
understand the need. Certainly you can use Python with the MySQLdb module
from any Linux machine and query away at the server.  As long as the MySQL
server accepts your IP/usr/pwd, it will respond to the SQL you pass it from
Python.

IOW - who/what needs an ODBC driver here?
Thomas Bartkus





More information about the Python-list mailing list