summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-06-18 19:57:01 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-06-18 19:57:01 (GMT)
commit68f1d45531d8e526917b9c0fe08c6e89d051b446 (patch)
tree78501156173784f024fd2709686b9ac74b14ea9e /Mac
parente5e2cdde1503a58779c5016cb053828d18ce4301 (diff)
downloadcpython-68f1d45531d8e526917b9c0fe08c6e89d051b446.zip
cpython-68f1d45531d8e526917b9c0fe08c6e89d051b446.tar.gz
cpython-68f1d45531d8e526917b9c0fe08c6e89d051b446.tar.bz2
Obtain path from a resource (unless USE_BUILTIN_PATH is #defined)
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/config.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Mac/Modules/config.c b/Mac/Modules/config.c
index 90221d3..385372a 100644
--- a/Mac/Modules/config.c
+++ b/Mac/Modules/config.c
@@ -142,7 +142,7 @@ getcopyright()
#ifndef PYTHONPATH
#ifdef macintosh
/* Mod by Jack: \n is now separator. */
-#define PYTHONPATH ":\n:Lib\n:Lib:stdwin\n:Lib:test\n:Lib:mac"
+#define PYTHONPATH ":\n:Lib\n:Lib:stdwin\n:Lib:test\n:Lib:mac\n:PackedLib\n:PlugIns"
#endif /* macintosh */
#endif /* !PYTHONPATH */
@@ -172,10 +172,17 @@ getpythonpath()
char *p, *endp;
int newlen;
extern char *PyMac_GetPythonDir();
- extern char *PyMac_GetScriptPath();
+#ifndef USE_BUILTIN_PATH
+ extern char *PyMac_GetPythonPath();
+#endif
if ( pythonpath ) return pythonpath;
curwd = PyMac_GetPythonDir();
+#ifndef USE_BUILTIN_PATH
+ if ( pythonpath = PyMac_GetPythonPath(curwd) )
+ return pythonpath;
+ printf("Warning: No pythonpath resource found, using builtin default\n");
+#endif
p = PYTHONPATH;
endp = p;
pythonpath = malloc(2);