Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82bfcc8

Browse files
Merged revisions 81649 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r81649 | ronald.oussoren | 2010-06-02 05:47:14 +0200 (Wed, 02 Jun 2010) | 5 lines 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. ........
1 parent c92c97c commit 82bfcc8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Mac/Tools/pythonw.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ int
151151
main(int argc, char **argv) {
152152
char* exec_path = get_python_path();
153153

154+
/*
155+
* Let argv[0] refer to the new interpreter. This is needed to
156+
* get the effect we want on OSX 10.5 or earlier. That is, without
157+
* changing argv[0] the real interpreter won't have access to
158+
* the Window Server.
159+
*/
160+
argv[0] = exec_path;
161+
154162
#ifdef HAVE_SPAWN_H
155163
/* We're weak-linking to posix-spawnv to ensure that
156164
* an executable build on 10.5 can work on 10.4.

0 commit comments

Comments
 (0)