[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21316] branches/blender2.5/blender/source /blender/python/intern/bpy_interface.c: 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.

Campbell Barton ideasman42 at gmail.com
Thu Jul 2 14:11:20 CEST 2009


Revision: 21316
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21316
Author:   campbellbarton
Date:     2009-07-02 14:11:20 +0200 (Thu, 02 Jul 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c

Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c	2009-07-02 11:28:42 UTC (rev 21315)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c	2009-07-02 12:11:20 UTC (rev 21316)
@@ -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 @@
 	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;





More information about the Bf-blender-cvs mailing list