public class Options
extends java.lang.Object
Modifier and Type | Field and 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 the site.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 |
inspect
When a script given on the command line finishes, start an interactive interpreter.
|
static boolean |
interactive
Set by the
-i option to the interpreter command, to ask for an interactive session to
start after the script ends. |
static boolean |
no_site
When
true the site.py was not imported. |
static boolean |
no_user_site
Whether -s (don't add user site directory to
sys.path ) was on the command line. |
static int |
optimize
Corresponds to -O (Python bytecode optimization), -OO (remove docstrings) flags in CPython.
|
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 true division 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 mode.
|
static int |
verbose
Deprecated.
Use
PrePy.getLoggingLevel() ,
PrePy.setLoggingLevel(java.util.logging.Level) , or java.util.logging
preferences to configure logging levels. |
Modifier and Type | Method and Description |
---|---|
static void |
setFromRegistry()
Initialize the static fields from the registry options.
|
public static boolean showJavaExceptions
public static boolean includeJavaStackInExceptions
public static boolean showPythonProxyExceptions
public static boolean respectJavaAccessibility
public static boolean importSite
false
the site.py
will not be imported. This may be set by the
command line main class (-S
option) or from the registry and is checked in
PythonInterpreter
.no_site
,
RegistryKey.PYTHON_IMPORT_SITE
public static boolean no_site
true
the site.py
was not imported. This is may be set by the command
line main class (-S
option) or from the registry. However, in Jython 2,
no_site
is simply the opposite of importSite
, as the interpreter starts up,
provided for compatibility with the standard Python sys.flags
. Actual control over
the import of the site module in Jython 2, when necessary from Java, is accomplished through
importSite
.@Deprecated public static int verbose
PrePy.getLoggingLevel()
,
PrePy.setLoggingLevel(java.util.logging.Level)
, or java.util.logging
preferences to configure logging levels.java.util.logging
, as adjusted by the command line -v
option.public static boolean interactive
-i
option to the interpreter command, to ask for an interactive session to
start after the script ends. It also allows certain streams to be considered interactive when
isatty
is not available.public static boolean inspect
true
by the -i
option on the command-line, or programmatically from the
script, and reset to false
just before the interactive session starts. (This session
only actually starts if the console is interactive.)public static java.lang.String proxyDebugDirectory
public static boolean caseok
RegistryKey.PYTHON_OPTIONS_CASE_OK
public static boolean Qnew
RegistryKey.PYTHON_OPTIONS_Q_NEW
public static boolean unbuffered
public static boolean py3k_warning
public static boolean dont_write_bytecode
public static boolean ignore_environment
public static boolean no_user_site
sys.path
) was on the command line. The
implementation is mostly in the site
module.public static int bytes_warning
public static int optimize
public static int division_warning
public static final java.lang.String sreCacheSpecDefault
PyString -> int[]
code
points.public static java.lang.String sreCacheSpec