Top Description Fields Constructors Methods
org.python.core

public Class RegistryKey

extends Object
Class Inheritance

Supported registry keys and their usage. Boolean properties are set with the String values true or yes for true, or false or no for false.

Field Summary

Modifier and TypeField and Description
public static final String
PYTHON_CACHEDIR

python.cachedir defines the directory to use for caches (currently just package information).

public static final String
PYTHON_CACHEDIR_SKIP

Setting python.cachedir.skip to true disables the package scan for the cachedir (as defined by python.cachedir or a default).

public static final String
PYTHON_CONSOLE

python.console names the class used for the Jython console.

public static final String
PYTHON_CONSOLE_ENCODING

python.console.encoding is the encoding used reading commands from the console.

public static final String
PYTHON_CPYTHON

python.cpython2 is the name of a CPython executable, version 2.7.

public static final String
PYTHON_DIVISION_WARNING

python.division.warning will print deprecation warnings when doing forced floor rounding with the / division operator.

public static final String
PYTHON_IMPORT_SITE

python.import.site controls whether to import site.py.

public static final String
PYTHON_INSPECT

When python.inspect is set, and a script given on the command line finishes, start an interactive interpreter.

public static final String
PYTHON_IO_ENCODING

python.io.encoding controls the encoding of sys.stdin, sys.stdout, and sys.stderr.

public static final String
PYTHON_IO_ERRORS

python.io.errors is the unicode error handler for I/O encoding problems.

public static final String
PYTHON_LOCALE_CONTROL

python.locale.control determines locale module behaviour, including enabling locale module support, currently in beta.

public static final String
PYTHON_MODULES_BUILTIN

python.modules.builtin controls the list of builtin modules; you can add, remove, or override builtin modules.

public static final String
PYTHON_OPTIONS_CASE_OK

If python.options.caseok is true, Jython will use the first module found on sys.path where java File.isFile() returns true.

public static final String
PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS

python.options.includeJavaStackInExceptions controls whether exceptions raised from Python code will include a Java stack trace in addition to the Python traceback.

public static final String
PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORY

python.options.proxyDebugDirectory is the directory where dynamically generated classes are written.

public static final String
PYTHON_OPTIONS_Q_NEW

python.options.Qnew controls whether true division is enabled for the / operator.

public static final String
PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONS

When an exception occurs in Java code, and it is not caught, python.options.showJavaExceptions controls whether the interpreter prints out the Java exception in the traceback.

public static final String
PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS

When python.options.showPythonProxyExceptions is true, python exceptions raised in overridden methods will be shown on stderr.

public static final String
PYTHON_OS

python.os defines the string used to report the underlying operating system.

public static final String
PYTHON_PACKAGES_DIRECTORIES

python.packages.directories defines a sequence of property names.

public static final String
PYTHON_PACKAGES_FAKEPATH

python.packages.fakepath defines a sequence of directories and JARs that are to be sources of Python packages.

public static final String
PYTHON_PACKAGES_PATHS

python.packages.paths defines a sequence of property names.

public static final String
PYTHON_PATH

python.path is the search path for Python modules, equivalent to CPython's PYTHONPATH environment variable.

public static final String
PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY

If python.security.respectJavaAccessibility is false, and you are using a Java version before Java 9, then Jython can access non-public fields, methods, and constructors.

public static final String
PYTHON_SRE_CACHESPEC

python.sre.cachespec is the specification for the SRE_STATE code point cache used by regular expressions.

public static final String
PYTHON_STARTUP

python.startup is the name of a file to be run at the start of each interactive session, but not when dropping in with the -i flag in after a script has run.

public static final String
PYTHON_VERBOSE

python.verbose sets the verbosity level for varying degrees of informative messages.

public static final String
USER_HOME

user.home sets the user home directory.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PYTHON_CACHEDIRback to summary
public static final String PYTHON_CACHEDIR

python.cachedir defines the directory to use for caches (currently just package information). This directory should be writable by the user. If this is an absolute path it is used as given, otherwise it is interpreted relative to sys.prefix (typically the directory of this file).

PYTHON_CACHEDIR_SKIPback to summary
public static final String PYTHON_CACHEDIR_SKIP

Setting python.cachedir.skip to true disables the package scan for the cachedir (as defined by python.cachedir or a default). Please be aware that disabling this will break importing from java packages.

PYTHON_CONSOLEback to summary
public static final String PYTHON_CONSOLE

python.console names the class used for the Jython console. Jython ships with a JLine console (http://jline.sourceforge.net/) out of the box. This is selected by default in the Jython command-line application (org.python.util.jython) if you do not define python.console to be another class on the command line. Alternatively, you can set python.console in the registry, but be aware that this will also affect the console in applications that embed a PythonInterpreter, or use Jython as a JSR-223 script engine.

Values for python.console
org.python.util.JLineConsole (default)
org.python.core.PlainConsole (featureless)

You may also set this to the name of a different console class in your classpath that extends PlainConsole. Note that org.python.util.ReadlineConsole has been removed in 2.7.

PYTHON_CONSOLE_ENCODINGback to summary
public static final String PYTHON_CONSOLE_ENCODING

python.console.encoding is the encoding used reading commands from the console. Must be a valid Java codec name, such as cp850.

PYTHON_CPYTHONback to summary
public static final String PYTHON_CPYTHON

python.cpython2 is the name of a CPython executable, version 2.7.

PYTHON_DIVISION_WARNINGback to summary
public static final String PYTHON_DIVISION_WARNING

python.division.warning will print deprecation warnings when doing forced floor rounding with the / division operator.

"3/2" equals 1 in Python 2.x (forced floor rounding) and 1.5 in Python 3 (convert ints to floats). This is equivalent to -Qwarn on the command line. See PEP 238.

Values: old, warn, warnall.

This property will be deprecated and removed in 3.x.

PYTHON_IMPORT_SITEback to summary
public static final String PYTHON_IMPORT_SITE

python.import.site controls whether to import site.py. Boolean.

Equivalent to -S on the command line.

PYTHON_INSPECTback to summary
public static final String PYTHON_INSPECT

When python.inspect is set, and a script given on the command line finishes, start an interactive interpreter. Any non-empty string value will enable this behaviour.

Equivalent to the -i option on the command-line, or The session only actually starts if the console is interactive.

PYTHON_IO_ENCODINGback to summary
public static final String PYTHON_IO_ENCODING

python.io.encoding controls the encoding of sys.stdin, sys.stdout, and sys.stderr. The encoding must name a Python codec, as in codecs.encode().

PYTHON_IO_ERRORSback to summary
public static final String PYTHON_IO_ERRORS

python.io.errors is the unicode error handler for I/O encoding problems.

PYTHON_LOCALE_CONTROLback to summary
public static final String PYTHON_LOCALE_CONTROL

python.locale.control determines locale module behaviour, including enabling locale module support, currently in beta.

Values:

Values for python.locale.control
settable Python locale module is available and supports setlocale() and other standard functions. This will be the default in a future Jython version.
jython2_legacy (default) Mix of implicit Java locale and emulated 'C' locale behaviour, consistent with behaviour in Jython 2.7.1 and earlier. Will be deprecated in a future Jython version.

More detail can be found in the documentation for the locale module and the underlying platform services exposed in org.python.modules._locale._locale.

PYTHON_MODULES_BUILTINback to summary
public static final String PYTHON_MODULES_BUILTIN

python.modules.builtin controls the list of builtin modules; you can add, remove, or override builtin modules. The value for this registry key is a comma separated list of module entries, each entry of which has the following allowable forms:

Values for python.modules.builtin
name The module name is name and the class name is org.python.modules.name
name:class The module name is name and the class name is class where class must be a fully qualified Java class name
name:null The module name is removed from the list of builtin modules

A good example would be to use a jni version of os for more functionality by having an entry such as os:com.foo.jni.os

PYTHON_OPTIONS_CASE_OKback to summary
public static final String PYTHON_OPTIONS_CASE_OK

If python.options.caseok is true, Jython will use the first module found on sys.path where java File.isFile() returns true. Setting this will have no effect on unix-type filesystems. On Windows/HFS+ systems setting it to true will enable Jython-2.0 behaviour.

PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONSback to summary
public static final String PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS

python.options.includeJavaStackInExceptions controls whether exceptions raised from Python code will include a Java stack trace in addition to the Python traceback. This can slow raising considerably. Boolean, true by default.

PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORYback to summary
public static final String PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORY

python.options.proxyDebugDirectory is the directory where dynamically generated classes are written. Nothing is ever read from here, it is only for debugging purposes.

PYTHON_OPTIONS_Q_NEWback to summary
public static final String PYTHON_OPTIONS_Q_NEW

python.options.Qnew controls whether true division is enabled for the / operator. See PEP 238. Boolean.

Equivalent to -Qnew on the command line.

PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONSback to summary
public static final String PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONS

When an exception occurs in Java code, and it is not caught, python.options.showJavaExceptions controls whether the interpreter prints out the Java exception in the traceback. Boolean, false by default.

PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONSback to summary
public static final String PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS

When python.options.showPythonProxyExceptions is true, python exceptions raised in overridden methods will be shown on stderr.

PYTHON_OSback to summary
public static final String PYTHON_OS

python.os defines the string used to report the underlying operating system. Used as prefix when resolving which operating system, impacting some OS-specific behaviour.

PYTHON_PACKAGES_DIRECTORIESback to summary
public static final String PYTHON_PACKAGES_DIRECTORIES

python.packages.directories defines a sequence of property names. Each property name is a path string, in which the elements are directories. Each directory contains JAR/ZIP files that are to be a source of Python packages. By default, these directories are those where the JVM stores its optional packages as JARs (a mechanism withdrawn in Java 9).

PYTHON_PACKAGES_FAKEPATHback to summary
public static final String PYTHON_PACKAGES_FAKEPATH

python.packages.fakepath defines a sequence of directories and JARs that are to be sources of Python packages.

PYTHON_PACKAGES_PATHSback to summary
public static final String PYTHON_PACKAGES_PATHS

python.packages.paths defines a sequence of property names. Each property is a path string. The default setting causes directories and JARs on the classpath and in the JRE (before Java 9) to be sources of Python packages.

PYTHON_PATHback to summary
public static final String PYTHON_PATH

python.path is the search path for Python modules, equivalent to CPython's PYTHONPATH environment variable.

PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITYback to summary
public static final String PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY

If python.security.respectJavaAccessibility is false, and you are using a Java version before Java 9, then Jython can access non-public fields, methods, and constructors. Normally, Jython can only provide access to public members of classes.

This may be deprecated in the future due to Java changes to accessibility from version 9 (at least for Oracle JDK and OpenJDK). See documentation on the --illegal-access (new) and --permit-illegal-access java command line flags for more detail.

Boolean.

PYTHON_SRE_CACHESPECback to summary
public static final String PYTHON_SRE_CACHESPEC

python.sre.cachespec is the specification for the SRE_STATE code point cache used by regular expressions. The spec string is in the comma separated key=value format of com.google.common.cache.CacheBuilder, within guava (which is also the source of the cache implementation).

PYTHON_STARTUPback to summary
public static final String PYTHON_STARTUP

python.startup is the name of a file to be run at the start of each interactive session, but not when dropping in with the -i flag in after a script has run.

PYTHON_VERBOSEback to summary
public static final String PYTHON_VERBOSE

python.verbose sets the verbosity level for varying degrees of informative messages. Valid values in order of increasing verbosity are error, warning, message, comment, debug.

USER_HOMEback to summary
public static final String USER_HOME

user.home sets the user home directory.

Constructor Detail

RegistryKeyback to summary
private RegistryKey()