468,290 Members | 2,077 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

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

Jun 15 '07 #1
4 984
On 15 Jun, 16:31, HMS Surprise <j...@datavoiceint.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:

http://www.jython.org/docs/zxjdbc.html

Paul

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

Jun 15 '07 #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
http://www.jython.org/docs/zxjdbc.html

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

Good luck,

--
Carsten Haese
http://informixdb.sourceforge.net
Jun 15 '07 #3
Ant
On Jun 15, 3:31 pm, HMS Surprise <j...@datavoiceint.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...

http://antroy.blogspot.com/


Jun 15 '07 #4
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

Jun 15 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Randell D. | last post: by
reply views Thread by Donald Tyler | last post: by
4 posts views Thread by mikey | last post: by
reply views Thread by Yun Guan | last post: by
reply views Thread by Mike Chirico | last post: by
2 posts views Thread by trihanhcie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.