This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: MacOS.WMAvailable() doesn't launch Python.app properly
Type: Stage:
Components: macOS Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: hhas, jackjansen
Priority: normal Keywords:

Created on 2005-12-17 16:12 by hhas, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27101 - (view) Author: (hhas) Date: 2005-12-17 16:12
Running the following on Apple-installed Python 2.3.5 on OS 10.4.3:

~ has$ pythonw
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MacOS
>>> MacOS.WMAvailable()
True

a Python.app process starts to launch as expected; however its icon 
remains bouncing indefinitely in the Dock. Additional prodding, e.g.:

>>> import Carbon.Evt
>>> Carbon.Evt.WaitNextEvent(0,0)
(0, (0, 0, 1141622, (751, 225), 128))

causes it to finish launching as expected (Dock icon stops bouncing, 
small black triangle appears next to it). Third-party has confirmed this 
problem.

Might be a problem with WMAvailable(), might be a problem in 
Python.app. Don't know enough Carbon to determine this myself.
msg27102 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2005-12-20 11:10
Logged In: YES 
user_id=45365

This is not a bug: this is expected behaviour:-)

Note that nothing is "launched" by WMavailable() or WaitNextEvent(): the only 
thing these calls do is signal the existence of pythonw (or actually 
Python.app) to the window manager.

Before WMAvailable() is called the window manager knows nothing about 
Python.app, so nothing is shown in the dock. WMavailable() causes the very 
first WM call, which (among other things) make the dock icon appear and 
start bouncing. The "end of bouncing" happens when the WM notices the app 
has gone into its event loop, which is indeed signalled by calling WNE() or 
something similar.
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42707
2005-12-17 16:12:19hhascreate