diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-02 16:11:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-02 16:11:20 +0400 |
commit | aefa7b626a5e623b5f98979a5cc849b7c21563cc (patch) | |
tree | 7d8b2b257ad6c479d469418f082518bd55d5cc14 /source/blender/python | |
parent | d44b341be642ec0ea10ed1aeb914025442e923c0 (diff) |
out own Py_GetPath() function to replace pythons, so we can bundle python modules with blender, #if 0'd for now but having it is useful for testing.
This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 8b5ad36f349..1d18fe36ad9 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -37,7 +37,7 @@ #include "BPY_extern.h" #include "../generic/bpy_internal_import.h" // our own imports -/* external util modukes */ +/* external util modules */ #include "../generic/Mathutils.h" #include "../generic/Geometry.h" @@ -132,6 +132,21 @@ static PyObject *CreateGlobalDictionary( bContext *C ) return dict; } +/* Use this so we can include our own python bundle */ +#if 0 +wchar_t* Py_GetPath(void) +{ + int i; + static wchar_t py_path[FILE_MAXDIR] = L""; + char *dirname= BLI_gethome_folder("python"); + if(dirname) { + i= mbstowcs(py_path, dirname, FILE_MAXDIR); + printf("py path %s, %d\n", dirname, i); + } + return py_path; +} +#endif + void BPY_start_python( int argc, char **argv ) { PyThreadState *py_tstate = NULL; |