Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jython 2 cpython bridge

6 views
Skip to first unread message

Randall Smith

unread,
May 24, 2004, 3:40:50 PM5/24/04
to
I would like to use a type 4 JDBC driver in my Python program. I
believe I can use in with Jython. Do you know of some way to
communicate between the Jython and Python processes so that the CPython
program can use the Jython JDBC database connection?

Randall

tertius

unread,
May 24, 2004, 4:37:25 PM5/24/04
to

Write the application using Jython. Then use SimpleXMLRPCServer on the
Jython side to register the necessary functions for an XML-RPC client
written in Python.

HTH
T

Irmen de Jong

unread,
May 24, 2004, 4:27:18 PM5/24/04
to
Randall Smith wrote:

Create some form of IPC between the two, for instance using xmlrpc.

--Irmen

PS: I would have suggested to use Pyro, but:
- Java/Jython doesn't have the select() system call that Pyro needs for a server,
- There are bugs in Jython that make it crash when compiling Pyro's source.

Steve Menard

unread,
May 25, 2004, 8:58:43 AM5/25/04
to

<shameless plug>
Alternately, you can look at JPype ( http://jpype.sourceforge.net ).

It is still a very early release, but I would welcome any feeback. And
version 0.1 should allow you to use JDBC without problem.

It currently only works on Windows, but if there is interest, I could
make a linux release pretty quickly.

</shameless plug>

Dominic

unread,
May 25, 2004, 10:08:38 AM5/25/04
to

> Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
Wow. Cool idea :-)

Ciao,
Dominic

John J. Lee

unread,
May 27, 2004, 6:49:36 PM5/27/04
to
Steve Menard <steve....@videotron.ca> writes:
[...]

> Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
>
> It is still a very early release, but I would welcome any feeback. And
> version 0.1 should allow you to use JDBC without problem.
>
> It currently only works on Windows, but if there is interest, I could
> make a linux release pretty quickly.

I assume you've seen JPE?

How does / will JPype differ from that?

I *think* JPE hasn't been maintained for quite a while, but I'm not
certain what its current state is.


John

Steve Menard

unread,
May 27, 2004, 8:26:21 PM5/27/04
to

Yes I have seen JPE. However, from the my admitedly quick look, it
didn't allow the seemless integration I am looking for. Either that, or
the samples did show off what JPE could do.

Besides I intend to take JPype beyonf Python->Java integration, and
choice is always good :)

Steve

John J. Lee

unread,
May 29, 2004, 7:23:46 AM5/29/04
to
Steve Menard <steve....@videotron.ca> writes:
[...]
> Besides I intend to take JPype beyonf Python->Java integration, and
> choice is always good :)

Especially when the closest alternative is unmaintained! I've
certainly wanted something like this in the past.

Good luck with your project.


John

Nicolas Lehuen

unread,
Jun 3, 2004, 3:42:21 AM6/3/04
to
Steve Menard <steve....@videotron.ca> wrote in message news:<ztHsc.42467$Fk4.1...@wagner.videotron.net>...

That's awesome ! This is still a little bit rough on the edges, but it
already works well enough to have an idea of what it could bring to
Python.

This is what I mean by 'rough on the edge' : launching a Python
program using JPype from a .py file is OK, but using the prompt is
weird :

>>> from jpype import *
>>> startJVM(r"C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll", "-ea")
>>> 1+1
File "<stdin>", line 1
1+1
^
SyntaxError: invalid syntax
>>> help()
File "<stdin>", line 1
help()
^
SyntaxError: invalid syntax

Anyway, this is extremely promising. Soon, we'll be able to seamlessly
use Java object thanks to JPype, as we do with COM objects using
win32all or ctypes. Python is THE real integration/composition
platform !

Thanks for your work, Steve.

Regards,
Nicolas

Steve M?nard

unread,
Jun 3, 2004, 1:43:10 PM6/3/04
to
nic...@lehuen.com (Nicolas Lehuen) wrote in message
<<snip>>

Thanks for your enthusiasm, and for the feedback.

However, I have tried what you've described above, and had no problem.
further An invalid syntax is usually something thrown by the parser,
way before any JPype-related code sees the commands.

If the problem persists, can you enter a bug report at JPype's
souceforge project page? ( http://sourceforge.net/projects/jpype/ )

I would like to use SF's tracking features to keep everyone up to date
on what is going on. As a matter of fact you'll be able to track each
releases progress by looking at the task list.

Again, thanks for your interest.

Steve Ménard

John Mudd

unread,
Jun 5, 2004, 6:04:49 AM6/5/04
to
How about Spiro?

http://www.freenet.org.nz/python/spiro/

Randall Smith <ran...@tnr.cc> wrote in message news:<8dssc.179150$f_5.163363@lakeread01>...

0 new messages