[Python-Dev] r85028 - in python/branches/py3k: Doc/c-api/init.rst Include/pythonrun.h Modules/getpath.c PC/getpathp.c (original) (raw)
Georg Brandl g.brandl at gmx.net
Mon Sep 27 16:57:40 CEST 2010
- Previous message: [Python-Dev] hg conversion: tags
- Next message: [Python-Dev] r85028 - in python/branches/py3k: Doc/c-api/init.rst Include/pythonrun.h Modules/getpath.c PC/getpathp.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 27.09.2010 07:32, schrieb kristjan.jonsson:
Author: kristjan.jonsson Date: Mon Sep 27 07:32:54 2010 New Revision: 85028
Log: issue 9910 Add a PySetPath api to override magic path computations when starting up python. Modified: python/branches/py3k/Doc/c-api/init.rst python/branches/py3k/Include/pythonrun.h python/branches/py3k/Modules/getpath.c python/branches/py3k/PC/getpathp.c Modified: python/branches/py3k/Doc/c-api/init.rst
+.. cfunction:: void PySetPath(const wchart *) + + .. index:: + triple: module; search; path + single: path (in module sys) + single: PyGetPath() + + Set the default module search path. If this function is called before + :cfunc:
PyInitialize
then :cfunc: PyGetPath won't attempt to compute + a default serarch path but uses the provided one in stead. This is useful + if Python is being embedded by an application that has full knowledge + of the location of all modules. The path components should be separated + by semicolons. + + This also causessys.executable
to be set only to the raw program name + (see :cfunc:PySetProgramName
) andfor sys.prefix
and +sys.execprefix
to be empty. It is up to the caller to modify these if + required after calling :cfunc:PyInitialize
. +
This needs a versionadded.
Georg
-- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
- Previous message: [Python-Dev] hg conversion: tags
- Next message: [Python-Dev] r85028 - in python/branches/py3k: Doc/c-api/init.rst Include/pythonrun.h Modules/getpath.c PC/getpathp.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]