[Bf-python] sitedirs and Python 2.4
Ken Hughes
khughes at pacific.edu
Sat Oct 29 18:45:40 CEST 2005
I was looking at a bug report
(https://projects.blender.org/tracker/index.php?func=detail&aid=3281&group_id=9&atid=125)
which is the second I've seen on the subject of site-packages no longer
being included in the path. I looked into it and apparently Python 2.4
no longer contains the "sitedirs" list.
I made a patch to init_syspath() which basicially checks for failure
when getting "sitedirs" from the site module's dict which does:
mod = PyImport_ReloadModule( mod );
if( mod )
Py_DECREF( mod );
else {
PyErr_Clear( );
printf ("site-packages could not be added.\n);
}
This basically causes main() in site.py to execute, calculating the
site-packages paths along with some other things.
My question: does this seem OK or am I overlooking something?
Ken
More information about the Bf-python
mailing list