I will try to answer the question.
Ad. A. It depends. If the module is Python code, it can be used as a regular module. I used this method for some modules, for example python-gnupg . If the module uses C libraries, such as libraries to access the PostgreSQL database, they cannot be used by Jython (they cannot even be installed from the source in environments using only Python without the C compiler and PostgreSQL libs and headers). But for PostgreSQL, I can use the JDBC driver, so for me this is not a problem.
So you have to check if the modules you want to use are simple Python or not. This is easy when most modules have setup.py . You can download such a module, extract it to some directory and use jython setup.py install in the same way as:
C:\python_libs\fpconst-0.7.2>jython setup.py install running install running build running build_py running install_lib copying build\lib\fpconst.py -> C:\jython2.5.3\Lib\site-packages byte-compiling C:\jython2.5.3\Lib\site-packages\fpconst.py to fpconst$py.class running install_egg_info Writing C:\jython2.5.3\Lib\site-packages\fpconst-0.7.2-py2.5.egg-info C:\python_libs\fpconst-0.7.2>jython Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36) [Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.7.0_09 Type "help", "copyright", "credits" or "license" for more information. >>> import fpconst >>> fpconst <module 'fpconst' from 'fpconst$py.class'>
For modules that are not supported, some error will be displayed:
C:\python_libs\pyodbc-2.0.58>jython setup.py install running install running build running build_ext building 'pyodbc' extension error: Compiling extensions is not supported on Jython
source share