Python scripts in XUL files use the Python scripting language.
Implementation
Python scripts are implemented with the Jython library. The Jython library currently implement the Python 2.7.18 version. Note that this library does not allow to install external Python modules.
MIME types
The MIME types supported for Python scripts are:
"text/python"
"application/python"
"application/x-python"
Import declarations
Python import declarations use the from <package> import >class>. For example:
from java.util import Listdef computeSize(self, list):return list.size()
See also
XUL Scripts: This article presents the usage of scripts in XUL files
Python MIME types: This article list the supported MIME types for the scripts