From: Andrew S. <str...@as...> - 2004-03-17 03:52:00
|
On Tuesday, March 16, 2004, at 11:32 PM, John Hunter wrote: > > On OS X 10.3, I can run TkAgg fine, interactive works great from the > prompt, etc. However, when I on the figure window to move it or click > on a navigation button etc, I get a "SetFrontProcess failed, -606" > message and the desired action does not happen. I am running under > X11, launching python from an xterm. > > Do you get this Andrew? Any ideas? Yes. Short answer: use "pythonw" not "python" Long anser: The OS X Cocoa WindowServer (I'm paraphrasing the proper terms, which I'm sure are slightly different) requires something like any application that wants to open a GUI window must be clicked or equivalent. Since that's not the way python generally works, pythonw for OS X was modified to do some black magic (LaunchServices??) to get around this requirement. This stuff is not in the normal python executable. For this reason, I have my trusty ipython shell using pythonw on OS X. There doesn't seem to be any problem running non-Tk apps with pythonw. FYI, pygame has something that will print a complaint if it's not run with pythonw. We could look under the hood and figure out how it's done there... |