4 static char *prefix
, *exec_prefix
, *progpath
, *module_search_path
=NULL
;
9 char *pypath
= getenv("Python$Path");
11 int pathlen
= strlen(pypath
);
12 module_search_path
= malloc(pathlen
+ 1);
13 if (module_search_path
)
14 strncpy(module_search_path
, pypath
, pathlen
+ 1);
17 "Not enough memory for dynamic PYTHONPATH.\n"
18 "Using default static PYTHONPATH.\n");
21 if (!module_search_path
)
22 module_search_path
= "<Python$Dir>.Lib";
23 prefix
= "<Python$Dir>";
25 progpath
= Py_GetProgramName();
28 /* External interface */
33 if (!module_search_path
)
35 return module_search_path
;
41 if (!module_search_path
)
49 if (!module_search_path
)
55 Py_GetProgramFullPath()
57 if (!module_search_path
)