Ugh! Python 3.1.x and MySQL

Martin Gregorie martin at address-in-sig.invalid
Sat Sep 11 01:42:29 CEST 2010


On Fri, 10 Sep 2010 09:27:28 -0700, fuglyducky wrote:

> Most of the python books coming out now are Py3K. I just started
> programming and have a need to access a MySQL database. I would like to
> use Python to do this. Unfortunately, I cannot find anyone that has
> created anything that allows my to do this.
> 
> I've tried installing an ODBC driver and using sqlalchemy, oursql, and a
> few other things with no luck.
> 
> So...just wondering if anyone is aware of any libraries/modules that I
> can use to connect to a MySQL DB using Python 3.1.x?
> 
> Ideally, I'd like to be able to this from both x86 and x64 systems (if
> that makes any difference).
>
You don't say what OS you're using, but if you're on a *NIX, take a look 
at pyodbc: http://code.google.com/p/pyodbc/

This Python module is a wrapper for unixODBC and consequently works with 
standard MySQL ODBC drivers.
 
iODBC: http://www.iodbc.org/ is similar

If you want something that's Windows compatible I can't help: I don't use 
either Windows or MySQL.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |



More information about the Python-list mailing list