Convert CPython library with C Code to Jython and Java

Alan Kennedy alanmk at hotmail.com
Tue May 13 09:57:16 EDT 2003


Thomas wrote:

> I want to port a Python library that contains C code to Jython and
> Java. What is the easiest way to do that?
> 
> (1) Convert C library to Java.
> (2) Somehow integrate compiled .pyd library into Jython and Java.
> (3) Any other solution?
> 
> Since I don´t have enough C know-how, I would prefer not to go for
> option (1). Can you recommend me any workaround?

Thomas,

You didn't mention why you want to do this, i.e. why the algorithm (i.e.
C code) has to run under a JVM?

Perhaps a distributed object system, such as pyro or CORBA, would do the
job much more simply? These would allow you to call code running in
native process from code running in a JVM, and vice versa, without
requiring porting, etc.

HTH,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list