Package jep
Class PyConfig
- java.lang.Object
-
- jep.PyConfig
-
public class PyConfig extends java.lang.Object
A configuration object for setting Python pre-initialization parameters.
- Since:
- 3.6
-
-
Constructor Summary
Constructors Constructor Description PyConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PyConfig
setDontWriteBytecodeFlag(int dontWriteBytecodeFlag)
Set the Py_DontWriteBytecodeFlag variable on the python interpreter.PyConfig
setHashRandomizationFlag(int hashRandomizationFlag)
Set the Py_HashRandomizationFlag variable on the python interpreter.PyConfig
setIgnoreEnvironmentFlag(int ignoreEnvironmentFlag)
Set the Py_IgnoreEnvironmentFlag variable on the python interpreter.PyConfig
setNoSiteFlag(int noSiteFlag)
Set the Py_NoSiteFlag variable on the python interpreter.PyConfig
setNoUserSiteDirectory(int noUserSiteDirectory)
Set the Py_NoUserSiteDirectory variable on the python interpreter.PyConfig
setOptimizeFlag(int optimizeFlag)
Set the Py_OptimizeFlag variable on the python interpreter.PyConfig
setPythonHome(java.lang.String pythonHome)
Set the home location on the python interpreter.PyConfig
setVerboseFlag(int verboseFlag)
Set the Py_VerboseFlag variable on the python interpreter.
-
-
-
Method Detail
-
setNoSiteFlag
public PyConfig setNoSiteFlag(int noSiteFlag)
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
public PyConfig setNoUserSiteDirectory(int noUserSiteDirectory)
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
public PyConfig setIgnoreEnvironmentFlag(int ignoreEnvironmentFlag)
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
public PyConfig setVerboseFlag(int verboseFlag)
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
public PyConfig setOptimizeFlag(int optimizeFlag)
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
public PyConfig setDontWriteBytecodeFlag(int dontWriteBytecodeFlag)
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
public PyConfig setHashRandomizationFlag(int hashRandomizationFlag)
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
public PyConfig setPythonHome(java.lang.String pythonHome)
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
-
-