jython 2 cpython bridge [英] jython 2 cpython bridge

查看:81
本文介绍了jython 2 cpython bridge的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Python程序中使用类型4 JDBC驱动程序。我相信我可以和Jython一起使用。
您是否知道某些方式在Jython和Python进程之间进行
通信,以便CPython

程序可以使用Jython JDBC数据库连接?

Randall

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

推荐答案

Randall Smith写道:
Randall Smith wrote:
我想使用类型4 JDBC驱动程序我的Python程序。我相信我可以和Jython一起使用。您是否知道在Jython和Python进程之间进行通信的某种方式,以便CPython程序可以使用Jython JDBC数据库连接?

Randall
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




使用Jython编写应用程序。然后在

Jython端使用SimpleXMLRPCServer为XML-RPC客户端注册必要的函数

用Python编写。


HTH

T



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


Randall Smith写道:
Randall Smith wrote:
我想使用类型4 JDBC我的Python程序中的驱动程序。我相信我可以和Jython一起使用。你知道在Jython和Python进程之间进行通信的某种方式,以便CPython程序可以使用Jython JDBC数据库连接吗?
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?




在两者之间创建某种形式的IPC,例如使用xmlrpc。


- 图片


PS:我建议使用Pyro,但是:

- Java / Jython没有Pyro对服务器所需的select()系统调用,

- Jython中存在一些错误编译Pyro的来源时崩溃。



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.


Irmen de Jong写道:
Irmen de Jong wrote:
Randall Smith写道:
Randall Smith wrote:
我想在我的Python程序中使用类型4 JDBC驱动程序。我相信我可以和Jython一起使用。你知道在Jython和Python进程之间进行通信的某种方式,以便CPython程序可以使用Jython JDBC数据库连接吗?
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?



创建一些表单两者之间的IPC,例如使用xmlrpc。

--Irmen

PS:我建议使用Pyro,但是:
- Java / Jython没有Pyro需要的select()系统调用服务器,
- Jython中存在一些错误,它们在编译Pyro的源代码时会崩溃。


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.




<无耻插件>

或者,您可以查看JPype( http://jpype.sourceforge.net )。


它仍然是一个非常早期的版本,但我会欢迎任何反馈。并且

版本0.1应该允许你没有问题地使用JDBC。


它目前只适用于Windows,但如果有兴趣,我可以

很快就发布了linux版本。


< / shameless plug>



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


这篇关于jython 2 cpython bridge的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆