[Pythonmac-SIG] (silly newbie question) Bringing a process to the front
Richard Bornat
richard@dcs.qmul.ac.uk
Mon, 12 Aug 2002 11:03:32 +0100
My problem with native Aqua and python seems to have a peculiar root.
What I see is that if I run the following command from Terminal
/Library/Frameworks/Python.framework//Versions/2.2/bin/python
~/cvsdownloads/jape/jape/X/python/GUI/japeserver.py
then I see a process window in the background, which won't come to the
foreground. If I click on the window, I get the message
SetFrontProcess failed,-600
(note, because of what follows, that the command is issued with absolute
pathnames.
If I run a similar command from a Unix process (actually, by issuing the
absolute path of japeserver.py, which starts with
#!/usr/bin/env python
) then the process runs -- I can see its messages on the console -- but
I can't see a window at all.
For this reason I downloaded the CVS source and (as my earlier message
revealed) managed to build native Aqua, but failed to install it.
Then, at last, a clue. Frustrated by python, I started to build an
analogue in Java. When I run this process with a local pathname I get
the same behaviour as with the python version
./japeserver
[JavaAppLauncher Error] executable path must be an absolute path, or it
cannot be brought to foreground
Buckyball: Couldn't bring app to front, err=-600
(that is, a process which is clearly running in the background, but
whose windows are invisible). Running it with an absolute pathname
works fine -- I get to see the window, I can interact with the menus.
I'd rather not spend a month or so transcribing the python code into
Java (not yet, anyway). So can anybody suggest what commands I should
be issuing -- from shell and from Unix process -- to start a python
which I _can_ interact with?
Richard Bornat