Differences between revisions 2 and 3
Revision 2 as of 2008-07-31 02:59:03
Size: 5333
Comment: done
Revision 3 as of 2008-07-31 03:10:00
Size: 5713
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Methods of specifying Jython options = = Methods of specifying Jython settings =
Line 3: Line 3:
 * `preProperties`, typically Java system properties specified with `-D` 'before' class/jar specification on Java command line  * `preProperties`, typically Java system properties specified with `-D` '''before''' class/jar specification on Java command line
Line 5: Line 5:
 * Registry: property files `registry` in Jython root and `.jython` in `user.home`; if both are present, the latter replaces the former completely. If either is present, the Java system properties are replaced entirely. (This is likely a bug in PySystemState.addRegistryFile.) See http://www.jython.org/Project/userguide.html#finding-the-registry-file for more information.  * Registry: property files `registry` in Jython root and `.jython` in `user.home`; if both are present, the latter replaces the former completely. If either is present, the Java system properties are replaced entirely. (This is likely a bug in `PySystemState.addRegistryFile`.) See [http://www.jython.org/Project/userguide.html#finding-the-registry-file Finding the Registry File] for more information.
Line 7: Line 7:
 * `postProperties`, typically Jython properties specified with `-D` 'after' class/jar specification on Java command line (these overwrite Java system properties, too.)  * `postProperties`, typically Jython properties specified with `-D` '''after''' class/jar specification on Java command line (these overwrite Java system properties, too.)
Line 14: Line 14:

== Documentation ==

 * The options whose destinations are static variables in the `Options` class are well-documented there.

 * The default `registry` file is severely bitrotted and needs redoing.

 * The [http://www.jython.org/Project/userguide.html#the-jython-registry Jython user guide] refers to a subset of these properties.

Methods of specifying Jython settings

  • preProperties, typically Java system properties specified with -D before class/jar specification on Java command line

  • Registry: property files registry in Jython root and .jython in user.home; if both are present, the latter replaces the former completely. If either is present, the Java system properties are replaced entirely. (This is likely a bug in PySystemState.addRegistryFile.) See [http://www.jython.org/Project/userguide.html#finding-the-registry-file Finding the Registry File] for more information.

  • postProperties, typically Jython properties specified with -D after class/jar specification on Java command line (these overwrite Java system properties, too.)

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

false

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"

python.packages.fakepath

SysPackageManager.findAllPackages

null

python.packages.paths

SysPackageManager.findAllPackages

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

python.path

end of path before JYTHON_JAR/Lib

""

python.prepath

beginning of path

""

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 or xml.sax.drivers2.drv_javasax

Settings (last edited 2009-01-27 08:25:07 by c-98-212-140-18)