|
Initializes the Python runtime.
PythonEnv.RuntimeIsInitialized is set to
RuntimeInitializationState.UserInitialized on normal completion of
this method call (when no exception is thrown), thus preventing
PythonRuntime.AutoInitializeRuntime from performing initialization,
and making this method ignore VEnvPath later.
The sys.stdout and sys.stderr are set to invoke StdOutCallback
and StdErrCallback (if they are not null). The redirections will be
iin effect even after PythonRuntime is disposed of.
In most use cases you will want to usee
PythonRuntime.AutoInitializeRuntime instead of this method as this
will cause the redirected sys.stdout and sys.stderr to be restored
or to do nothing after PythonRuntime is disposed of.
|