[Bf-python] Changing confusing python console start-up message
Ken Hughes
khughes at pacific.edu
Fri Jul 7 20:27:59 CEST 2006
Was looking at bug report 4398 ("console message for python version
tracking")
http://projects.blender.org/tracker/index.php?func=detail&aid=4398&group_id=9&atid=125
The initial report was based on the user being confused by the console
messages.
I'm proposing before the release we change the messages to indicate the
build-in Python version and the installed Python version. I've added a
simple test inside init_syspath which checks the methods defined in the
site module to determine the version:
printf("Looking for Python installation... ");
mod = PyImport_ImportModule( "site" ); /* new ref */
if( mod ) {
if( PyDict_GetItemString(PyModule_GetDict(mod),"addsitepackages") )
printf( "found version 2.4.\n" );
else if( PyDict_GetItemString(PyModule_GetDict(mod),"sitedirs") )
printf( "found version 2.3 or earlier.\n" );
else
printf( "found version 2.2 or earlier.\n" );
Py_DECREF( mod );
} else
print warning.....
I also changed the "looking for" message to "Internal Python interpreter
version". I think at the very least we should change this.
Ken
More information about the Bf-python
mailing list