Size: 1386
Comment:
|
← Revision 8 as of 2014-08-20 10:41:34 ⇥
Size: 973
Comment: Added note about zxjdbc/jyjdbc.
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Jython modules = | |
Line 2: | Line 3: |
[:../: FAQ Home] | JythonFaq |
Line 4: | Line 5: |
= Jython modules = | <<TableOfContents>> |
Line 8: | Line 9: |
'''What parts of the Python library are supported?''' | == What parts of the Python library are supported? == |
Line 10: | Line 11: |
The good news is that Jython now supports a large majority of the standard Python library. The bad news is that this has moved so rapidly, it's hard to keep the documentation up to date. | The good news is that Jython now supports almost all of the standard Python library. |
Line 12: | Line 13: |
Built-in modules (e.g. those that are written in C for CPython) are a different story. These would have to be ported to Java, or implemented with a JNI bridge in order to be used by Jython. Some built-in modules have been ported to JPython, most notably cStringIO, cPickle, struct, and binascii. It is unlikely that JNI modules will be included in Jython proper though. If you want to use a standard Python module, just try importing it. If that works, you're probably all set. You can also do a dir() on the modules to check the list of functions it implements. If there is some standard Python module that you have a real need for that doesn't work with JPython yet, please send us mail. |
If there is some standard Python module that you have a real need for that doesn't work with Jython yet, please file a bug. |
Line 20: | Line 17: |
'''Can I use the python DB API from Jython?''' | == Can I use the python DB API from Jython? == |
Line 22: | Line 19: |
Take a look at zxJDBC which gives data database connectivity from Jython using the Python DB API 2.0 interface. | Use zxJDBC which gives data database connectivity from Jython using the Python DB API 2.0 interface. For more information about using zxJDBC see: |
Line 24: | Line 21: |
http://www.ziclix.com/zxjdbc | - http://www.jython.org/docs/zxjdbc.html Note: the use of zxJDBC is now discouraged in favour of JyJDBC. One reason for that is the lack of testing in zxJDBC, which makes non trivial to change it. - https://code.google.com/p/jyjdbc/ |
Line 28: | Line 29: |
'''Can I use the Numeric package from Jython?''' | == Can I use the Numeric package from Jython? == |
Line 32: | Line 33: |
- http://members.home.net/tim.hochberg/ | - http://jnumerical.sourceforge.net/index.html |
Jython modules
Contents
What parts of the Python library are supported?
The good news is that Jython now supports almost all of the standard Python library.
If there is some standard Python module that you have a real need for that doesn't work with Jython yet, please file a bug.
Can I use the python DB API from Jython?
Use zxJDBC which gives data database connectivity from Jython using the Python DB API 2.0 interface. For more information about using zxJDBC see:
- http://www.jython.org/docs/zxjdbc.html
Note: the use of zxJDBC is now discouraged in favour of JyJDBC. One reason for that is the lack of testing in zxJDBC, which makes non trivial to change it.
- https://code.google.com/p/jyjdbc/
Can I use the Numeric package from Jython?
Take a look at at Tim Hochberg's Java implementation of Numeric, JNumeric.