Methods of specifying Jython settings

For preProperties and postProperties, alternate properties may be passed to PySystemState.initialize or PythonInterpreter.initialize by programmatic users of Jython.

The runtime registry (PySystemState.registry from Java, or sys.registry from Python) is created from the above three sources.

Other command-line arguments are written directly into Options static variables without going through the properties system; the overlapping properties are python.divisionWarning, python.options.Qnew and python.verbose. In these overlapping cases, the above three sources always take precedence over the command-line equivalents. (This precedence should likely be reversed.)

Documentation

Source

Destination

Default

install.root

python.cachedir

PySystemState.cachedir = File(...)

"cachedir"

python.cachedir.skip

PySystemState.cachedir = null

true if standalone, else false

python.collections

PyInstance.initializeIterators

""

python.console

jython.main

"org.python.util.InteractiveConsole"

python.console.encoding

CompilerFlags.encoding

python.console.readlinelib

python.deprecated.keywordMangling

Options.deprecatedKeywordMangling

false

python.divisionWarning

Options.divisionWarning

python.executable

PySystemState.[default]Executable

set by launcher script, else null

python.home

PySystemState.[exec_]prefix

set by launcher script, else "."

python.modules.builtin

PySystemState.builtin_module_names

""; appended to Setup.builtinModules

python.options.Qnew

Options.Qnew

false

python.options.caseok

Options.caseok

false

python.options.compileClass

unused; in default registry file

false (in registry file)

python.options.includeJavaStackInExceptions

Options.includeJavaStackInExceptions

true

python.options.internalTablesImpl

InternalTables.createInternalTables

null

python.options.proxyDebugDirectory

Options.proxyDebugDirectory

null

python.options.showJavaExceptions

Options.showJavaExceptions

false

python.options.showPythonProxyExceptions

Options.showPythonProxyExceptions

false

python.os

os._name

"posix"

python.packages.directories

SysPackageManager.findAllPackages

"java.ext.dirs" (see PackageScanning)

python.packages.fakepath

SysPackageManager.findAllPackages

null

python.packages.paths

SysPackageManager.findAllPackages

"java.class.path,sun.boot.class.path"

python.path {X}

end of path after JYTHON_JAR/Lib

""

python.prepath (python.path in r5043+)

beginning of path after current dir

""

python.security.respectJavaAccessibility

Options.respectJavaAccessibility

true

python.verbose

Options.verbose

Py.MESSAGE = 1

python.xml.sax.parser

xml.sax.default_parser_list (split)

PY_SAX_PARSER, else xml.sax.drivers2.drv_javasax

{X} gone in Jython 2.5 or later