From: Safoura <s.s...@gm...> - 2011-06-23 18:14:53
|
> > Hi Jim, > > As I was doing some research for my problem, I found this post and joined this > > mailing list. > > I need to communicate with some device which I have a perfectly working Python > > module for. I also have an extensive Java program which needs to talk to the > > device and I thought I just call the perfect python module functions from the > > already existing Java code. > > Therefore I have been looking for a way to call the Python module lib's > > functions from Java and found out that Jython is designed to do that. > > However, the Python module uses "PyUSB" library which apparently uses ctypes to > > communicate with native libraries in Python. > > Now is it true that I won't simply be able to continue this project any more > > because ctypes is not supported in Jython? I was so excited about this but now > > don't know how to go further. > > If that is the case, is there any thing other than Jython that you could suggest > > as a solution, by any chance? > > Any comment/suggestion would be greatly appreciated. > Try Py4J. It will bridge CPython and Jython so you can use stuff from both. > > Thanks so much > > Safi > > > > > > Hi Thanks for introducing Py4J; I went through the docs. But isn't that for accessing the Java objects from a python program and the other way around. As I mentioned, I need to find a way to call the Python lib functions from my running Java code. Would it be still an option? How about Jepp? Could that be a solution too? Thanks so much in advance. Safi |