Convert CPython library with C Code to Jython and Java

Ype Kingma ykingma at accessforall.nl
Tue May 13 20:41:24 EDT 2003


Thomas wrote:

> Hello!
> 
> 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?

First look for a java library that can help you implementing
the C library. There is quite a bit of free java code available.
Then rewrite your C library as jython code, evt. using the java
library(s) you found earlier.

Finally, only when you have a performance problem, rewrite
performance critical parts of your code in java.


Have fun,
Ype


--
email at xs4all.nl




More information about the Python-list mailing list