*** getpathp.c Thu Dec 11 15:18:20 2003 --- //harvard/devel_lib/rex_python_build/PC/getpathp.c Thu Dec 11 15:19:44 2003 *************** *** 649,654 **** --- 649,682 ---- /* External interface */ + void + Py_SetSysPaths(const char* module_path, const char* prefiX, + const char* execprefix, const char* fullpath) + { + if (prefix) + strncpy(prefix, prefiX, MAXPATHLEN); + + + /* on Win32 systems execprefix isn't used */ + + if (fullpath) + strncpy(progpath, fullpath, MAXPATHLEN); + + if (module_path) { + module_search_path = PyMem_Malloc(strlen(module_path) + 1); + if (module_search_path != NULL) { + strcpy(module_search_path, module_path); + } + else { + /* if the module_path can't be set, reset everyting + else as well and we'll fall back to the old way of + doing things. */ + prefix[0] = progpath[0] = '\0'; + } + } + } + + char * Py_GetPath(void) { *************** *** 678,681 **** calculate_path(); return progpath; } - --- 706,708 ----