CookXml Jython Extension
Introduction
This extension basically adds a
<jython> tag, which supports
Jython in CookXml. Each time this tag is used, a new instance of
PythonInterpreter is created. Objects created using XML can be referenced using their
id. This extension requires the
cookxml.common package.
Personally I am not a big fan of scripting inside XML, since excessive use of scripts instead of actual Java code is meaningless in terms of developemental efforts and performance. However, from time to time I do find myself wishing to have extra flexibilities in designing certain aspects of GUI using XML. See the demo offered below to see what I mean.
Demo
Try the
Java Web Start demo for some simple demos.
Note that Jython has trouble loading Java classes that are not in the same jar file as Jython in Java Web Start. Therefore, if you intend to write a Java Web Start applicationi using Jython, I would suggest you to repackage Jython, CookXml and other Java classes that you will ever need in Python codes into a single big jar file named jython.jar.