.PythonInit {RSPython} | R Documentation |
These functions allow one to initializes the Python engine and creates an interpreter
and also to discard it and its contents.
The .PythonInit
function must be called before invoking a Python function or method.
One can start, stop and restart the Python interpreter any number of times.
.PythonInit(path=NULL, merge=T, warn = FALSE, force=TRUE) .PythonTerminate()
path |
if specified, this should be a string specifying the directories
in which to find Python modules. The directory names should be separated by the appropriate
directory separator (":" on Unix). If this is missing, the current value fo
the PYTHONPATH environment variable is used. |
merge |
a logical value indicating whether the basic elements needed
to locate the Python modules used to implement this package should be appended
to the value of the system variable PYTHONPATH |
warn |
if TRUE , issue a warning about the implicit initialization |
force |
if FALSE and the Python interpreter has already
been initialized, we just issue a warning and return. However, if
this is TRUE , we attempt to perform another initialization. |
.PythonInit
passes its arguments
to .PythonPath
to determine the
appropriate value for the PYTHONPATH
environment
variable. It then uses the returned value to set
this environment variable and then initializes the python
interpreter.
NULL or an error occurs.
Very bad things will happen if you stop the interpreter and then access a Python object, function, method, etc. Python will terminate.
Duncan Temple Lang
http://www.omegahat.org/RSPython, http://www.python.org
## Not run: .PythonInit() ## End(Not run)