Class RegistryKey

java.lang.Object
org.python.core.RegistryKey

public class RegistryKey extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    python.cachedir defines the directory to use for caches (currently just package information).
    static final String
    Setting python.cachedir.skip to true disables the package scan for the cachedir (as defined by python.cachedir or a default).
    static final String
    python.console names the class used for the Jython console.
    static final String
    python.console.encoding is the encoding used reading commands from the console.
    static final String
    python.cpython2 is the name of a CPython executable, version 2.7.
    static final String
    python.division.warning will print deprecation warnings when doing forced floor rounding with the / division operator.
    static final String
    python.import.site controls whether to import site.py.
    static final String
    When python.inspect is set, and a script given on the command line finishes, start an interactive interpreter.
    static final String
    python.io.encoding controls the encoding of sys.stdin, sys.stdout, and sys.stderr.
    static final String
    python.io.errors is the unicode error handler for I/O encoding problems.
    static final String
    python.locale.control determines locale module behaviour, including enabling locale module support, currently in beta.
    static final String
    python.modules.builtin controls the list of builtin modules; you can add, remove, or override builtin modules.
    static final String
    If python.options.caseok is true, Jython will use the first module found on sys.path where java File.isFile() returns true.
    static final String
    python.options.includeJavaStackInExceptions controls whether exceptions raised from Python code will include a Java stack trace in addition to the Python traceback.
    static final String
    python.options.proxyDebugDirectory is the directory where dynamically generated classes are written.
    static final String
    python.options.Qnew controls whether true division is enabled for the / operator.
    static final String
    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.
    static final String
    When python.options.showPythonProxyExceptions is true, python exceptions raised in overridden methods will be shown on stderr.
    static final String
    python.os defines the string used to report the underlying operating system.
    static final String
    python.packages.directories defines a sequence of property names.
    static final String
    python.packages.fakepath defines a sequence of directories and JARs that are to be sources of Python packages.
    static final String
    python.packages.paths defines a sequence of property names.
    static final String
    python.path is the search path for Python modules, equivalent to CPython's PYTHONPATH environment variable.
    static final String
    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.
    static final String
    python.sre.cachespec is the specification for the SRE_STATE code point cache used by regular expressions.
    static final String
    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.
    static final String
    python.verbose sets the verbosity level for varying degrees of informative messages.
    static final String
    user.home sets the user home directory.
  • Method Summary

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PYTHON_CACHEDIR

      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).
      See Also:
    • PYTHON_CACHEDIR_SKIP

      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.
      See Also:
    • PYTHON_CPYTHON

      public static final String PYTHON_CPYTHON
      python.cpython2 is the name of a CPython executable, version 2.7.
      See Also:
    • PYTHON_DIVISION_WARNING

      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.

      See Also:
    • PYTHON_CONSOLE

      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 (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
      JLineConsole (default)
      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.

      See Also:
    • PYTHON_CONSOLE_ENCODING

      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.
      See Also:
    • PYTHON_IMPORT_SITE

      public static final String PYTHON_IMPORT_SITE
      python.import.site controls whether to import site.py. Boolean.

      Equivalent to -S on the command line.

      See Also:
    • PYTHON_INSPECT

      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.

      See Also:
    • PYTHON_IO_ENCODING

      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().
      See Also:
    • PYTHON_IO_ERRORS

      public static final String PYTHON_IO_ERRORS
      python.io.errors is the unicode error handler for I/O encoding problems.
      See Also:
    • PYTHON_LOCALE_CONTROL

      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 _locale.

      See Also:
    • PYTHON_MODULES_BUILTIN

      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

      See Also:
    • PYTHON_OPTIONS_CASE_OK

      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.
      See Also:
    • PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS

      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.
      See Also:
    • PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONS

      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.
      See Also:
    • PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS

      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.
      See Also:
    • PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORY

      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.
      See Also:
    • PYTHON_OPTIONS_Q_NEW

      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.

      See Also:
    • PYTHON_OS

      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.
      See Also:
    • PYTHON_PACKAGES_FAKEPATH

      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.
      See Also:
    • PYTHON_PACKAGES_PATHS

      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.
      See Also:
    • PYTHON_PACKAGES_DIRECTORIES

      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).
      See Also:
    • PYTHON_PATH

      public static final String PYTHON_PATH
      python.path is the search path for Python modules, equivalent to CPython's PYTHONPATH environment variable.
      See Also:
    • PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY

      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.

      See Also:
    • PYTHON_SRE_CACHESPEC

      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).
      See Also:
    • PYTHON_STARTUP

      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.
      See Also:
    • PYTHON_VERBOSE

      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.
      See Also:
    • USER_HOME

      public static final String USER_HOME
      user.home sets the user home directory.
      See Also: