[Tutor] Mysqldb.py:::Cursor has no 'query' attribute?

Israel Evans israel@lith.com
Fri, 22 Mar 2002 10:54:39 -0800


I'm using python 2.2 and MySQL 3.23.49-nt and the MySQL python module I'm
using is from http://www.python.org/topics/database/modules.html .
I selected the MySQL link on that page which took me to a page which sent me
off to sourceforge to get the latest stuff whereat I downloaded 
MySQL-python-0.9.1.win32-py2.2.exe.  The module is then only callable by
using the funky CompatMysqldb.py file.

In the source file I see this paragraph hints at a number of frustrations
that led to this naming scheme.  :)

"""
This is the original Mysqldb.py module which came with MySQLmodule-1.4,
only it has been adapted to use _mysql instead MySQL. It is intended
for backwards compatibility purposes only. But as a bonus, transactions
will work if your database server and table types support them. It is
called CompatMysqldb instead of Mysqldb so as not to interfere with an
existing Mysqldb, or MySQLdb on case-insensitive brain-dead operating
systems.

Under no circumstances should you bug James Henstridge about this!!!
"""


So am I using an old Mysql module?  Is there a new more standard one I
should be using?  Since I've just started working with all of this, I'm
extremely flexible on the tools I use.  Any suggestions?

~Israel~


-----Original Message-----
From: Pijus Virketis [mailto:virketis@fas.harvard.edu] 
Sent: 22 March 2002 10:42 AM
To: Israel Evans
Cc: tutor@python.org
Subject: Re: [Tutor] Mysqldb.py:::Cursor has no 'query' attribute?

Israel,

> >>> import CompatMysqldb

What module is this? I usually use MySQLdb
(http://sourceforge.net/projects/mysql-python/), which is called with an
"import MySQLdb." Can you point me to the place where you got it, so I can
try and replicate the behaviour? Also, what version of Python and MySQL are
you using?

Cheers,

Pijus