MySQL - Jython2.2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • HMS Surprise

    #1

    MySQL - Jython2.2

    I thought I had a winner mySql-python but it require2 python 2.3-5 and
    the tool I am using (maxq) is based on jython 2.2. Is there another
    way that I could perform queries from python?


    thanx,

    jh

  • Paul Boddie

    #2
    Re: MySQL - Jython2.2

    On 15 Jun, 16:31, HMS Surprise <j...@datavoice int.comwrote:
    I thought I had a winner mySql-python but it require2 python 2.3-5 and
    the tool I am using (maxq) is based on jython 2.2. Is there another
    way that I could perform queries from python?
    For Jython you should use the JDBC driver for the database system in
    question (MySQL Connector/J in this case, I believe [1]), either
    writing code which uses the JDBC API directly, or using the zxJDBC
    module for DB-API compatibility (such as that provided by most other
    Python database modules). See here for details:



    Paul

    [1] http://www.mysql.com/products/connector/j/

    Comment

    • Carsten Haese

      #3
      Re: MySQL - Jython2.2

      On Fri, 2007-06-15 at 07:31 -0700, HMS Surprise wrote:
      I thought I had a winner mySql-python but it require2 python 2.3-5 and
      the tool I am using (maxq) is based on jython 2.2. Is there another
      way that I could perform queries from python?
      The low version number is not your main problem. The main problem is
      that Jython is based on Java, and it can not use CPython modules such as
      MySQL-python. You'll need JDBC:

      http://dev.mysql.com/downloads/connector/j/5.0.html


      I have not tried this combination myself, so your mileage may vary, but
      in theory this should work.

      Good luck,

      --
      Carsten Haese



      Comment

      • Ant

        #4
        Re: MySQL - Jython2.2

        On Jun 15, 3:31 pm, HMS Surprise <j...@datavoice int.comwrote:
        I thought I had a winner mySql-python but it require2 python 2.3-5 and
        the tool I am using (maxq) is based on jython 2.2. Is there another
        way that I could perform queries from python?
        If you want to query via Jython, use the jdbc driver from www.mysql.com,
        and you an then use JDBC from within Jython. You'll just need to add
        the mysql jdbc jar to your classpath.

        HTH.

        --
        Ant...

        Notes on programming, cycling, climbing, linux and stuff.





        Comment

        • HMS Surprise

          #5
          Re: MySQL - Jython2.2

          Thanks, everyone.

          I will give it a try. Don't know a lot about mySQL (or any flavor SQL)
          but from some minute exposure to the ODBC connector I am guessing that
          jdbc provides a connector.

          Wish me luck....

          jh

          Comment

          Working...