From: Kenworthy, E. <Edw...@ma...> - 2002-07-17 10:22:59
|
Apparently most Python modules should work with Jython, with the following exceptions: modules that are targeted at a specific platform; modules that contain functionality not included in the JVM; modules implemented in C. Perhaps mapscriptc is implemented in C (guessing from the 'c' suffix) ? -----Original Message----- From: Vinko Vrsalovic [mailto:vi...@cp...] Sent: 17 July 2002 11:21 To: jyt...@li... Subject: [Jython-users] External modules in Jython? Hello, I'm trying to use jython to embed a python application in a JSP/Servlets environment (struts, and the like). My problem is: the application uses a python module that doesn't come with the standard library. I copied the modules built in /python-dir/site-packages/* to /jython-dir/Lib/, but jython complains the following way: Jython 2.1 on java1.3.1_02 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import mapscript Traceback (innermost last): File "<console>", line 1, in ? File "/usr/java/jython/Lib/mapscript/__init__.py", line 1, in ? File "/usr/java/jython/Lib/mapscript/mapscript.py", line 2, in ? ImportError: no module named mapscriptc mapscriptc is a shared library (mapscriptc.so) that is present in the Lib and Lib/mapscript directories (i copied it just to be sure it doesn't work). From python it works fine, and it's present directly in the site-packages dir. Is it possible to import those shared libraries? If so, how? What do I need to read? :-) Oh, and finally, is my main objective acheivable? (embedding the python-cgi app in a tomcat/struts environment?) Thanks, -- Vinko Vrsalovic <vinko[|-@-|]cprsig.cl> http://www.cprsig.cl ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |