Appendix B. Jython Cookbook

There are a plethora of examples for using Jython that can be found on the web. This appendix is a compilation of some of the most useful examples that we have found. Those that were chosen are focused on topics that are not widely covered elsewhere on the web.

Unless otherwise noted, each of these examples have been originally authored for working on versions of Jython prior to 2.5.x, but we have tested each of them using Jython 2.5.1 and they function as advertised.

Logging

Using log4j with Jython, Josh Juneau

wiki.python.org/jython/JythonMonthly/Articles/August2006/1

Are you still using the Jython print command to show your errors? How about in a production environment, are you using any formal logging? If not, you should ...

Get The Definitive Guide to Jython: Python for the Java™ Platform now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.