[Pythonmac-SIG] Re: [wxPython-mac] Porting wxPython to Mac

Kevin Ollivier kevino@tulane.edu
Tue, 19 Mar 2002 15:20:56 -0500


Hi Jack,

Will do. Also, let me quickly update you on what I've been doing with
MachOPython in my spare moments. Right now I'm focusing on the Python.app
multiple instances issue, and basically trying to create a hack to have
Python.app start command-line Python and then close. execv(path, argv) (in
<unistd.h>) starts command line Python fine, but it doesn't terminate
Python.app, and I couldn't find an exec variant that did this. I think I
could set up an AppleEvents handler to open a second, third, etc. instances
of the command-line Python (is that were document open events go?), but I'm
trying to avoid having an extra dock icon for Python.app.

I looked at the CoreService's LaunchApplication() function, and from the
docs it sounds like there's an option for terminating the parent process
with that, but I'm unable to get FSMakeFSSpec() to work! It keeps giving me
errNo -37, which I believe amounts to "bad path". (Sorry, still getting
familiar with Macs!) I've tried both absolute and relative paths, using both
UNIX-style and Mac-style delimiters and no luck with any of them. I set
volume and dir to 0, and even tried putting "\p" in front of the filename to
specify a Pascal string. Grrr....! Am I missing something simple here? The
call would look like:

FSMakeFSSpec(0,0,"\pMacintosh
HD:Applications:Python.app:Contents:MacOS:python", &myfilespec), or with
UNIX-style delimiters:

FSMakeFSSpec(0,0,"\p/Applications/Python.app/Contents/MacOS/python",
&myfilespec)

>From my testing, I get the impression that it expects Mac-style delimiters,
so maybe I'm bungling up the Mac path? Any ideas on how to get it to
correctly find command line python?

Thanks,

Kevin

----- Original Message -----
From: "Jack Jansen" <Jack.Jansen@oratrix.com>
To: <wxpython-mac@lists.wxwindows.org>
Sent: Tuesday, March 19, 2002 5:55 AM
Subject: Re: [wxPython-mac] Porting wxPython to Mac


>
> On dinsdag, maart 19, 2002, at 05:55 , Kevin Ollivier wrote:
>
> > Hi all,
> >
> > I've been helping out with an initiative to port wxPython
> > (http://www.wxpython.org) to the Mac OS X platform.
>
> Kevin,
> if you get replies only to yourself (or to the unix-porting
> list), could you summarize them to wxpython-mac?
>
> Thanks,
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution --
> Emma Goldman -
>
>
> _______________________________________________
> wxPython-mac mailing list
> wxPython-mac@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-mac
>