Jython Cpython Integration

I am about to start a project where I will probably use PyQt or Pyside.

I will need to interact with a buggy third-party server software that provides C ++ and Java API. The Java API is much easier to use because you get exceptions where with C ++ libraries you get segfaults. In addition, Python bindings to the Java API are automatic with Jython, while Python bindings for the C ++ API do not exist.

So how can the CPython PyQt client application communicate with these Java APIs? How would you do that?

Will you have another separate Java process on the client that serializes / opens the objects and communicates with the PyQt process through the socket?

I don't want to reinvent the wheel ... is there some kind of standard interface for these types of things? Some technologies that I should pay attention to? RPC, Corba, etc.

Thanks ~ Eric

+3
source share
5 answers

You can call Java from C-Python via JPype

http://jpype.sourceforge.net/

+4
source

See related question where I recommend execnet. This seems to be the correct solution to these problems if you want to write integration in Python (like me).

+3
source

( , ), , - CORBA - . , Java CORBA , - C IDL.

Swig , . . , , Python Java.

0

, SimpleXMLRPCServer xmlrpclib. Jython.

0

, Java Qt. (Google: " Java Qt" )

, Jython.

Qt Jambi: http://en.wikipedia.org/wiki/Qt_Jambi

Qt Java: http://sourceforge.net/projects/qtjava/

( , , .)

And here is the relevant thread of SO.

0
source

Source: https://habr.com/ru/post/1746065/


All Articles