Package jep
Class PyConfig
java.lang.Object
jep.PyConfig
A configuration object for setting Python pre-initialization parameters.
- Since:
- 3.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetDontWriteBytecodeFlag
(int dontWriteBytecodeFlag) Set the Py_DontWriteBytecodeFlag variable on the python interpreter.setHashRandomizationFlag
(int hashRandomizationFlag) Set the Py_HashRandomizationFlag variable on the python interpreter.setIgnoreEnvironmentFlag
(int ignoreEnvironmentFlag) Set the Py_IgnoreEnvironmentFlag variable on the python interpreter.setNoSiteFlag
(int noSiteFlag) Set the Py_NoSiteFlag variable on the python interpreter.setNoUserSiteDirectory
(int noUserSiteDirectory) Set the Py_NoUserSiteDirectory variable on the python interpreter.setOptimizeFlag
(int optimizeFlag) Set the Py_OptimizeFlag variable on the python interpreter.setPythonHome
(String pythonHome) Set the home location on the python interpreter.setVerboseFlag
(int verboseFlag) Set the Py_VerboseFlag variable on the python interpreter.
-
Constructor Details
-
PyConfig
public PyConfig()
-
-
Method Details
-
setNoSiteFlag
Set the Py_NoSiteFlag variable on the python interpreter. This corresponds to the python "-S" flag and will prevent the "site" module from being automatically loaded.- Parameters:
noSiteFlag
- value to pass to Python for Py_NoSiteFlag- Returns:
- a reference to this PyConfig
-
setNoUserSiteDirectory
Set the Py_NoUserSiteDirectory variable on the python interpreter. This corresponds to the python "-s" flag and will prevent the user's local python site directory from being added to sys.path.- Parameters:
noUserSiteDirectory
- value to pass to Python for Py_NoUserSiteDirectory- Returns:
- a reference to this PyConfig
-
setIgnoreEnvironmentFlag
Set the Py_IgnoreEnvironmentFlag variable on the python interpreter. This corresponds to the python "-E" flag and will instruct python to ignore all PYTHON* environment variables (e.g. PYTHONPATH).- Parameters:
ignoreEnvironmentFlag
- value to pass to Python for Py_IgnoreEnvironmentFlag- Returns:
- a reference to this PyConfig
-
setVerboseFlag
Set the Py_VerboseFlag variable on the python interpreter. This corresponds to the python "-v" flag and will increase verbosity, in particular tracing import statements.- Parameters:
verboseFlag
- value to pass to Python for Py_VerboseFlag- Returns:
- a reference to this PyConfig
-
setOptimizeFlag
Set the Py_OptimizeFlag variable on the python interpreter. This corresponds to the python "-O" flag and will slightly optimize the generated bytecode.- Parameters:
optimizeFlag
- value to pass to Python for Py_OptimizeFlag- Returns:
- a reference to this PyConfig
-
setDontWriteBytecodeFlag
Set the Py_DontWriteBytecodeFlag variable on the python interpreter. This corresponds to the python "-B" flag and will instruct python to not write .py[co] files on import.- Parameters:
dontWriteBytecodeFlag
- value to pass to Python for Py_DontWriteBytecodeFlag- Returns:
- a reference to this PyConfig
-
setHashRandomizationFlag
Set the Py_HashRandomizationFlag variable on the python interpreter. This corresponds to the environment variable PYTHONHASHSEED.- Parameters:
hashRandomizationFlag
- value to pass to Python for Py_HashRandomizationFlag- Returns:
- a reference to this PyConfig
-
setPythonHome
Set the home location on the python interpreter. THis is the location of the standard python libraries. This corresponds to the environment variable PYTHONHOME.- Parameters:
pythonHome
- the home location of the python installation- Returns:
- a reference to this PyConfig
-