Hello,

Thank you Tobias and I applogize for posting my mail to the dev mailing list.

Regards M Baroudi.




2008/7/21 Tobias Ivarsson <thobes@gmail.com>:
Hi,

This type of question should really be directed to jython-users, jython-dev is for discussion regarding development of Jython. I am cc'ing the jython-users list.

jythonc is heavily deprecated. It is no longer a supported but still available as is. Another tool with similar functionality might be made available in the future, but the exact details have not been mapped out yet.

The preferred way of including python code in your Java application using Jython is to embed Jython using org.python.core.PythonInterpreter in your Java application.

Something like this:

PythonInterpreter python = ...
python.exec("import mylibrary");
python.exec("entry_object = mylibrary.EntryClass()");
PyObject entryObject = python.get("entry_object");

/Tobias

On Mon, Jul 21, 2008 at 12:22 PM, Baroudi Malek <baroudi.malek@gmail.com> wrote:
Hello Jython Dev list,

I'm newbie in jython and I would to know if I can I use some python GIS library in my java project with Jython ?

My problem is how to use some ".py" file in my java application,I tried jythonc --core --deep --jar appletdemo.jar *.py
in console but I have this error :

./jpywork/socket.java:737: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier
(use -source 1.3 or lower to use 'assert' as an identifier)
            if (frame.getglobal("__debug__").__nonzero__()) Py.assert(frame.getlocal(0).__getattr__("sock"));
                                                               ^

my python library is here : http://svn.featureserver.org/trunk/vectorformats/vectorformats/Formats/KML.py
                                       http://svn.featureserver.org/trunk/vectorformats/vectorformats/Formats/OSM.py
                                       http://svn.featureserver.org/trunk/vectorformats/vectorformats/Formats/WFS.py
                                       http://svn.featureserver.org/trunk/vectorformats/vectorformats/Feature.py


Thank you in advance.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jython-dev mailing list
Jython-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-dev





--
"Qui allume sa bougie à la mienne reçoit de la lumière sans me plonger dans l'obscurité…"
' Thomas Jefferson'