Update of /cvsroot/pure-data/externals/grill/py/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31341/source
Modified Files: pybase.cpp Log Message: corrected Python object propagation (attribute "py") and adjusted help files small fix enable module packages (module/__init__.py[co]), now also for Max enable compiled-only scripts (without .py)
Index: pybase.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pybase.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pybase.cpp 23 Mar 2006 01:42:05 -0000 1.14 --- pybase.cpp 23 Mar 2006 01:55:14 -0000 1.15 *************** *** 455,458 **** --- 455,459 ---- // if dir is current working directory... name points to dir if(dir == name) strcpy(dir,"."); + return name != NULL; #elif FLEXT_SYS == FLEXT_SYS_MAX short path; *************** *** 571,584 **** newmod = PyImport_ReloadModule(module); else { ! // search in module path char dir[1024]; ! if(getmodulepath(modname.c_str(),dir,sizeof(dir))) { ! AddToPath(dir); ! newmod = PyImport_ImportModule((char *)modname.c_str()); ! } ! else { PyErr_SetString(PyExc_ImportError,"Module not found in path"); ! newmod = NULL; ! } } } --- 572,584 ---- newmod = PyImport_ReloadModule(module); else { ! // search in module path (TODO: check before if module is already present to avoid costly searching) char dir[1024]; ! if(!getmodulepath(modname.c_str(),dir,sizeof(dir))) PyErr_SetString(PyExc_ImportError,"Module not found in path"); ! else ! AddToPath(dir); ! ! // module could also be loaded ok, even if it's not in the path (e.g. for internal stuff) ! newmod = PyImport_ImportModule((char *)modname.c_str()); } }