Package org.python.core
Class Options
- java.lang.Object
-
- org.python.core.Options
-
public class Options extends java.lang.Object
A class with static fields for each of the settable options. The options from registry and command line is copied into the fields here and the rest of Jython checks these fields.
-
-
Field Summary
Fields Modifier and Type Field Description static int
bytes_warning
static boolean
caseok
If true, Jython will use the first module found on sys.path where java File.isFile() returns true.static int
division_warning
Enable division warning.static boolean
dont_write_bytecode
Whether -B (don't write bytecode on import) was enabled via the command line.static boolean
ignore_environment
Whether -E (ignore environment) was enabled via the command line.static boolean
importSite
When false thesite.py
will not be imported.static boolean
includeJavaStackInExceptions
If true, exceptions raised from Python code will include a Java stack trace in addition to the Python traceback.static boolean
no_site
static boolean
no_user_site
static int
optimize
static java.lang.String
proxyDebugDirectory
A directory where the dynamically generated classes are written.static boolean
py3k_warning
Whether -3 (py3k warnings) was enabled via the command line.static boolean
Qnew
If true, enable truedivision for the '/' operator.static boolean
respectJavaAccessibility
If true, Jython respects Java the accessibility flag for fields, methods, and constructors.static boolean
showJavaExceptions
when an exception occurs in Java code, and it is not caught, should the interpreter print out the Java exception in the traceback?static boolean
showPythonProxyExceptions
When true, python exception raised in overridden methods will be shown on stderr.static java.lang.String
sreCacheSpec
static java.lang.String
sreCacheSpecDefault
Cache spec for the SRE_STATE code point cache.static boolean
unbuffered
Force stdin, stdout and stderr to be unbuffered, and opened in binary modestatic int
verbose
Set verbosity to Py.ERROR, Py.WARNING, Py.MESSAGE, Py.COMMENT, or Py.DEBUG for varying levels of informative messages from Jython.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
setFromRegistry()
Initialize the static fields from the registry options.
-
-
-
Field Detail
-
showJavaExceptions
public static boolean showJavaExceptions
when an exception occurs in Java code, and it is not caught, should the interpreter print out the Java exception in the traceback?
-
includeJavaStackInExceptions
public static boolean includeJavaStackInExceptions
If true, exceptions raised from Python code will include a Java stack trace in addition to the Python traceback. This can slow raising considerably.
-
showPythonProxyExceptions
public static boolean showPythonProxyExceptions
When true, python exception raised in overridden methods will be shown on stderr. This option is remarkably useful when python is used for implementing CORBA server. Some CORBA servers will turn python exception (say a NameError) into an anonymous user exception without any stacktrace. Setting this option will show the stacktrace.
-
respectJavaAccessibility
public static boolean respectJavaAccessibility
If true, Jython respects Java the accessibility flag for fields, methods, and constructors. This means you can only access public members. Set this to false to access all members by toggling the accessible flag on the member.
-
importSite
public static boolean importSite
When false thesite.py
will not be imported. This is only honored by the command line main class.
-
verbose
public static int verbose
Set verbosity to Py.ERROR, Py.WARNING, Py.MESSAGE, Py.COMMENT, or Py.DEBUG for varying levels of informative messages from Jython. Normally this option is set from the command line.
-
proxyDebugDirectory
public static java.lang.String proxyDebugDirectory
A directory where the dynamically generated classes are written. Nothing is ever read from here, it is only for debugging purposes.
-
caseok
public static boolean caseok
If true, Jython will use the first module found on sys.path where java File.isFile() returns true. Setting this to true have no effect on unix-type filesystems. On Windows/HFS+ systems setting it to true will enable Jython-2.0 behaviour.
-
Qnew
public static boolean Qnew
If true, enable truedivision for the '/' operator.
-
unbuffered
public static boolean unbuffered
Force stdin, stdout and stderr to be unbuffered, and opened in binary mode
-
py3k_warning
public static boolean py3k_warning
Whether -3 (py3k warnings) was enabled via the command line.
-
dont_write_bytecode
public static boolean dont_write_bytecode
Whether -B (don't write bytecode on import) was enabled via the command line.
-
ignore_environment
public static boolean ignore_environment
Whether -E (ignore environment) was enabled via the command line.
-
no_user_site
public static boolean no_user_site
-
no_site
public static boolean no_site
-
bytes_warning
public static int bytes_warning
-
optimize
public static int optimize
-
division_warning
public static int division_warning
Enable division warning. The value maps to the registry values of- old: 0
- warn: 1
- warnall: 2
-
sreCacheSpecDefault
public static final java.lang.String sreCacheSpecDefault
Cache spec for the SRE_STATE code point cache. The value maps to the CacheBuilderSpec string and affects how the SRE_STATE cache will behave/evict cached PyString -> int[] code points.- See Also:
- Constant Field Values
-
sreCacheSpec
public static java.lang.String sreCacheSpec
-
-