New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE does not work on Mac OS X #38003
Comments
When building a framework build of python, the IDLE application that is made does not work anymore. Here is the command that is causing trouble: /Library/Frameworks/../../Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/Contents/MacOS/python ../python/dist/src/Mac/scripts/BuildApplet.py --output /Library/Frameworks/../../Applications/MacPython-2.3/IDLE.app --extra ../python/dist/src/Tools/idle ../python/dist/src/Tools/idle/idle or essentially: python Mac/scripts/BuildApplet.py \ The semantics of BuildApplet.py (well, buildtools.py) changed slightly, in a way that upset IDLE's build - it used to copy its argument (the main program file) into Resources/ under a new name - __main__.py. This changed so that the main program file keeps the same file name. For IDLE, the main program is Tools/idle/idle but the Tools/idle directory needs to be copied into the bundle as well; before the slight semantic change in buildtools.py this worked OK but now two things named "idle" are getting copied to Resources/ and its not working. Its hard to argue that BuildApplet really should support an --extra argument with the same basename as the main program file. Perhaps the best fix is to integrate the latest idlefork with Python 2.3 - this would eliminate this problem because the main file for mac applets is not called idle in idlefork. Another way to fix this would be to extend BuildApplet and buildtools and bundlebuilder so that it is possible to specify a new name for the --extra argument, something like: python Mac/scripts/BuildApplet.py --output IDLE.app --extra Tools/idle --rename-extra idlelib Tools/idle/idle But the first fix option seems way more palateable. |
Logged In: YES I think I have a found a good solution. Instead of using Tools/idle/idle as the main program argument to BuildApplet.py, the patch to Mac/OSX/Makefile below uses Tools/idle/macosx_main.py, which is attached separately. The macosx_main.py file I provide is a copy of Tools/idle/idle with some code to work around another recent problem with running IDLE on Mac OS X. The new code removes some funny arguments that Mac OS X adds when GUI applications are launched. This same code can be found in Lib/plat-mac/argvemulator.py. I would have used argvemulator.py directly but I don't know if that would have other consequences. The patch to Mac/OSX/Makefile will be necessary when idlefork is integrated back into python. That is the reason for naming the new file macosx_main.py |
Logged In: YES Updated macosx_main.py - since Jack added an argvemulation wrapper, macosx_main.py needs no special code and is the same as Tools/idle/idle |
Logged In: YES Fixed in Mac/OSX/Makefile rev. 1.36. In a slightly different way than suggested, though: BuildApplet can now have different names for source and destination for files to include in the bundle, and this is used to copy ../Tools/idle to Contents/Resources/idlelib in the bundle. This makes the original main program (idle) work again. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: