summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-06-02 03:47:14 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-06-02 03:47:14 (GMT)
commit27c72e9e5cc8b2d8d4e632c010ec8bf77360ae4d (patch)
tree66176f27797c624a538bb238cc3a5f6647d6a419 /Mac/Tools
parent98bc31f5e0642e88eecd8237ea71be5e60e36dcd (diff)
downloadcpython-27c72e9e5cc8b2d8d4e632c010ec8bf77360ae4d.zip
cpython-27c72e9e5cc8b2d8d4e632c010ec8bf77360ae4d.tar.gz
cpython-27c72e9e5cc8b2d8d4e632c010ec8bf77360ae4d.tar.bz2
Fix for issue8868: without this patch 'MacOS.WMAvailable()' will return
False on MacOSX 10.5 or earlier and scripts won't be able to access GUI functionality.
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/pythonw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
index 7f45ca9..08e069b 100644
--- a/Mac/Tools/pythonw.c
+++ b/Mac/Tools/pythonw.c
@@ -149,6 +149,14 @@ int
main(int argc, char **argv) {
char* exec_path = get_python_path();
+ /*
+ * Let argv[0] refer to the new interpreter. This is needed to
+ * get the effect we want on OSX 10.5 or earlier. That is, without
+ * changing argv[0] the real interpreter won't have access to
+ * the Window Server.
+ */
+ argv[0] = exec_path;
+
#ifdef HAVE_SPAWN_H
/* We're weak-linking to posix-spawnv to ensure that