From: Xavier N. <fx...@is...> - 2004-10-02 18:55:29
|
On Oct 2, 2004, at 2:09, Farryp Philippe-Auguste wrote: > Hi, > > I'm a newbie to Jython. > > I was wondering if it was possible to call a jython module from python. > > I have a software written in python. I have a third party software > that I'm > integrating to my software using their java Libraries. I decided to > write the > glue between both software in Jython and their java libraries. Now > that this > is done, I would like to be able to call the Jython class I just > created from > my python code. Jython is a Python interpreter that "extends" the language in several ways, for instance allowing the use of Java classes. Since the source code itself is not what distinguishes Jython from regular Python, but the program that interprets it, Jython is required to use that glue code. It doesn't matter whether those modules are just imported from a pure Python one, they'll need Java objects at some point, and so CPython won't know what to do with them. If the code was 2.1 or could be ported to 2.1 (in addition to use modules available in Jython, which exclude some written in C) running the whole program with Jython would probably be the easiest solution. -- fxn |