(May be OT) developing in jython, using in java?

G

Gerardo Herzig

Hi all. I dont know if this is the right place for asking this, but
maybe some of you know where i must go.
The thing is:

Im writing a very simple class (in python) to access some LDAP server. A
companion will access to the same LDAP server too, but his developing in
java. So i said "ok, wait, i dont think we have to make the exact same
thing twice! Let me see if jython can help us"....I can find (after a
quick review) an answer to this: "Can i, using jython, make a package so
my companion can import that package as a webservice??"

As im farly new in python, *very* new at Java, and *even newer* at
jython, my brain just said to me "ok, i dont know, i want a beer", so
maybe some of you can gide me to where i must go in order to clarify my
ideas.

Thanks!!!

Gerardo
 
D

Diez B. Roggisch

Gerardo said:
Hi all. I dont know if this is the right place for asking this, but
maybe some of you know where i must go.
The thing is:

Im writing a very simple class (in python) to access some LDAP server. A
companion will access to the same LDAP server too, but his developing in
java. So i said "ok, wait, i dont think we have to make the exact same
thing twice! Let me see if jython can help us"....I can find (after a
quick review) an answer to this: "Can i, using jython, make a package so
my companion can import that package as a webservice??"

As im farly new in python, *very* new at Java, and *even newer* at
jython, my brain just said to me "ok, i dont know, i want a beer", so
maybe some of you can gide me to where i must go in order to clarify my
ideas.

There is a jython mailing list, which is probably a better place to ask
jython-related questions.


The problem is that jython essentially brings the syntax of python to
the library of Java, plus it tries to wrap as much Python libs using the
corresponding Java-libs. But there are gaping holes in that effort due
to lacks of the JDK - think of e.g. posix functionalities.

And while accessing Java from Jython is a piece of cake, the other way
round isn't so easy.

For you actual problem I'd say: it's the wrong way - because if you need
your LDAP-class from CPython, you won't be able to help the Java-guy,
because the libraries for accessing LDAP in Java differ from the one
in CPython, and making the Jython class accessible from Java isn't worth
the effort.

diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,358
Latest member
TreyTritt8

Latest Threads

Top