4 static char *prefix
,*exec_prefix
,*progpath
,*module_search_path
=0;
8 { char *pypath
=getenv("Python$Path");
10 { module_search_path
=malloc(strlen(pypath
)+1);
11 if (module_search_path
) sprintf(module_search_path
,"%s",pypath
);
13 { /* We can't exit, so print a warning and limp along */
14 fprintf(stderr
, "Not enough memory for dynamic PYTHONPATH.\n");
15 fprintf(stderr
, "Using default static PYTHONPATH.\n");
18 if(!module_search_path
) module_search_path
= "<Python$Dir>.Lib";
21 progpath
="<Python$Dir>";
24 /* External interface */
29 if (!module_search_path
)
31 return module_search_path
;
37 if (!module_search_path
)
45 if (!module_search_path
)
51 Py_GetProgramFullPath()
53 if (!module_search_path
)