"Pure Python" MySQL module like Net::MySQL

R

Ravi

Hi,

I did some googling, and found that there doesn't seem to be a pure
python MySQL communication module. There is one for perl however,
Net::MySQL. I was wondering if there was a specific reason why something
similar hasn't been implemented in Python, a limitation of the language
or libraries perhaps? I briefly scanned through the perl source for
Net::MySQL, and there doesn't seem to be anything that couldn't be done
in Python, but I'm a fresh convert from perl land and I don't much
beyond the basics of Python yet.

Thanks,
Ravi
 
?

=?iso-8859-1?Q?Jos=E9_Mar=EDa?= Mateos

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I did some googling, and found that there doesn't seem to be a pure
python MySQL communication module. There is one for perl however,

I think there's a MySQLdb package for Python that might fulfill
your needs.

Regards,

chema.

- --
Chema Mateos - RinzeWind | Take out the "-news" in my e-mail address
#debian-es irc.freenode.net | if replying. Message will be eaten by
Jabber ID - rinzewind AT jabber.org | /dev/null if you don't.
GPG-key: http://chema.homelinux.org/~chema/key.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Gm2c9P6GbSlI+hkRAg+dAJ9MQWl33yv7+nRkKCWZjLixguW8DACgjQ+D
sxGBFj4nUORjCOq4pgIoEHI=
=dU1C
-----END PGP SIGNATURE-----
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Ravi said:
Hi,

I did some googling, and found that there doesn't seem to be a pure
python MySQL communication module. There is one for perl however,
Net::MySQL.

Does it implement the MySQL wire protocol in pure Perl, without linking
to libmysql? Sure that's possible in Python.
I was wondering if there was a specific reason why something
similar hasn't been implemented in Python,

Nobody needed it badly enough.
a limitation of the language or libraries perhaps?
No.

I briefly scanned through the perl source for
Net::MySQL, and there doesn't seem to be anything that couldn't be done
in Python, but I'm a fresh convert from perl land and I don't much
beyond the basics of Python yet.

Is there any particular reason why you'd need such a beast instead of
just using MySQLdb?

-- Gerhard
 
R

Ravi

Gerhard said:
>
Is there any particular reason why you'd need such a beast instead of
just using MySQLdb?
I'm developing for cell phones/PDA's using Jython, because Java is
available. Yet, a proper C compiler is not, so libmysql cannot be
compiled. I will see if I can put a wrapper on the Java MySQL connector
to make it accessible in Jython.

Thanks for your help,

Ravi
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Ravi said:
I'm developing for cell phones/PDA's using Jython, because Java is
available. Yet, a proper C compiler is not, so libmysql cannot be
compiled. I will see if I can put a wrapper on the Java MySQL connector
to make it accessible in Jython.

No need for that, just download zxJDBC :)

-- Gerhard
 
S

Skip Montanaro

I saw Paul's quote in John's reply. I've yet to see Paul's not. Hopefully
I'm not taking anything out of context.


Skip> libraries haven't been ported. On the other hand, the MySQL wire
Skip> protocol is probably not part of the official external interface,
Skip> so the author has to track changes to the protocol.

Paul> What the heck? If the wire protocol isn't part of the official
Paul> external interface, then how on earth are external applications
Paul> supposed to talk to the database?

By using the client library MySQL provides. As far as I can tell, the MySQL
wire protocol is not documented in the current version of the manual
(http://www.mysql.com/documentation/mysql/bychapter/). That suggests to me
that the protocol is not part of the external interface, and anyone
implementing it directly can't really complain if it changes.

Skip
 
S

Suchandra Thapa

Paul Rubin said:
What the heck? If the wire protocol isn't part of the official
external interface, then how on earth are external applications
supposed to talk to the database? They certainly can't expect you to
use black-box client libraries if they're at all serious about being
in the same league with Oracle.


Actually, I think they do. With a change to a gpl licensed client library,
in mysql 4.x, I think mysql ab is trying to get more revenue from anyone using
the mysql database for commercial purposes. Forcing all access to the database
to go through their client libraries is one of the things that made this
possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top