"Pure Python" MySQL module like Net::MySQL

Discussion in 'Python' started by Ravi, Jul 20, 2003.

  1. Ravi

    Ravi Guest

    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
     
    Ravi, Jul 20, 2003
    #1
    1. Advertising

  2. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    In comp.lang.python, Ravi () 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+nRkKCWZjLixguW8DACgjQ+D
    sxGBFj4nUORjCOq4pgIoEHI=
    =dU1C
    -----END PGP SIGNATURE-----
     
    =?iso-8859-1?Q?Jos=E9_Mar=EDa?= Mateos, Jul 20, 2003
    #2
    1. Advertising

  3. 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
     
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Jul 20, 2003
    #3
  4. Ravi

    Ravi Guest

    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
     
    Ravi, Jul 20, 2003
    #4
  5. 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
     
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Jul 20, 2003
    #5
  6. 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
     
    Skip Montanaro, Jul 21, 2003
    #6
  7. 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

    ----------------------------------------------------------------------------
     
    Suchandra Thapa, Jul 21, 2003
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Akihiro KAYAMA
    Replies:
    4
    Views:
    356
    Akihiro KAYAMA
    Feb 25, 2006
  2. Steve Holden
    Replies:
    8
    Views:
    309
    Akihiro KAYAMA
    Feb 26, 2006
  3. Rob McMullen
    Replies:
    2
    Views:
    302
    Rob McMullen
    Oct 28, 2007
  4. Roy Smith

    Pure Python interface to MySQL?

    Roy Smith, Oct 7, 2008, in forum: Python
    Replies:
    8
    Views:
    1,799
    Gerhard Häring
    Oct 7, 2008
  5. Carl
    Replies:
    1
    Views:
    348
    James Mills
    Oct 28, 2008
Loading...

Share This Page