Skip to content

Commit 61f39c6

Browse files
author
georg.brandl
committed
#5015: document PythonHome API functions.
git-svn-id: http://svn.python.org/projects/python/trunk@69297 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 74dcc6d commit 61f39c6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Doc/c-api/init.rst

+14
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,20 @@ Initialization, Finalization, and Threads
369369
check w/ Guido.
370370
371371
372+
.. cfunction:: void Py_SetPythonHome(char *home)
373+
374+
Set the default "home" directory, that is, the location of the standard
375+
Python libraries. The libraries are searched in
376+
:file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`.
377+
378+
379+
.. cfunction:: char* Py_GetPythonHome()
380+
381+
Return the default "home", that is, the value set by a previous call to
382+
:cfunc:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME`
383+
environment variable if it is set.
384+
385+
372386
.. _threads:
373387

374388
Thread State and the Global Interpreter Lock

0 commit comments

Comments
 (0)