Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   "Pure Python" MySQL module like Net::MySQL (http://www.velocityreviews.com/forums/t319904-pure-python-mysql-module-like-net-mysql.html)

Ravi 07-20-2003 06:43 AM

"Pure Python" MySQL module like Net::MySQL
 
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 07-20-2003 10:23 AM

Re: "Pure Python" MySQL module like Net::MySQL
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In comp.lang.python, Ravi (rxs141@cwru.edu) wrote:
> 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+nRkKCWZjLixguW8DA CgjQ+D
sxGBFj4nUORjCOq4pgIoEHI=
=dU1C
-----END PGP SIGNATURE-----

=?ISO-8859-1?Q?Gerhard_H=E4ring?= 07-20-2003 01:09 PM

Re: "Pure Python" MySQL module like Net::MySQL
 
Ravi wrote:
> 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


Ravi 07-20-2003 06:50 PM

Re: "Pure Python" MySQL module like Net::MySQL
 
Gerhard Häring wrote:
>
> 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?= 07-20-2003 07:38 PM

Re: "Pure Python" MySQL module like Net::MySQL
 
Ravi wrote:
> Gerhard Häring wrote:
> >

>
>> 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.


No need for that, just download zxJDBC :)

-- Gerhard


Skip Montanaro 07-21-2003 02:42 PM

Re: "Pure Python" MySQL module like Net::MySQL
 
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


Suchandra Thapa 07-21-2003 06:53 PM

Re: "Pure Python" MySQL module like Net::MySQL
 
Paul Rubin <> wrote:
> 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.

--
----------------------------------------------------------------------------
Suchandra Thapa
s-thapa-11@NOSPAMalumni.uchicago.edu
----------------------------------------------------------------------------


All times are GMT. The time now is 04:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.