[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] OS X distro...




On Thursday, January 17, 2002, at 05:03 PM, TheG wrote:

>> There's a great little utility called Console.app in 
>> /Applications/Utilities/ ..  stdout for any application started from 
>> the finder is redirected to /private/var/tmp/console.log, Console.app 
>> is just a fancy shmancy tail -f
>>
>
> Thanks, I found this just after posting. RTFM manual time for me it 
> seems...! :-)
>
>> As far as I know, that's just how MacOS works.  I've never seen two of 
>> the same application started up.  One thing that could be done is that 
>> Python.app (the stub that hosts the python interpreter) could be 
>> multi-threaded or multiforked or something of the sort to accept 
>> "document open" events after the initial startup.  It's possible, 
>> eventually, but for now it's beyond the time I have to spare.  One 
>> thing you could do, it's a nasty hack.. buuut.  If you duplicate 
>> /Application/Python.app as say, /Applications/PythonSecond.app, and 
>> you cd /Applications/PythonSecond.app/Resources and sudo vi Info.plist 
>> and change the CFBundleName from PythonInterpreter to say 
>> PythonSecondInterpreter .. if you drag a python file onto 
>> PythonSecond, it should launch separately from one started from 
>> Python.app.  It's retarded, but that's the only solution I can offer 
>> you right now.
>>
>
> I've never seen two of the same app launched either; 'good point. Bit 
> of an arse that and like the application-owner meta-data, a portion of 
> Apple's views that I *don't* agree with...
>
> Anyway, the solution above will have to do, as I can think of numerous 
> occasions where I'll want that purely from a work perspective. I'll try 
> it that over the weekend and report back -- thanks for the tip.
>

I did it.  I spent a couple hours in gdb looking at ppc assembly dumps 
and shit because I noticed that the java runtime can have multiple dock 
icons (even with the same command line) so I fucked with it and figured 
out the private/undocumented functions to do it.  Well, enough of them 
to get it to work that is.  As of yet, it only works from the command 
line (irony there eh?) and it only works if you start python from full 
path.  /usr/local/bin/python myPythonFile.py [ even menus work!! ]

Running the python files directly (at least via #!/usr/bin/env python) 
will not work, nor with using python from path.

It's a start, now all I have to do is figure out how to rewrite argv[0] 
successfully without issues and then I'll have all those problems fixed, 
except *now* launching from the finder will be the only way to not start 
more than one python at the same time :)

pete - when is 1.4 supposed to release?  I'd like a couple days to bang 
on this, and then we can have our sources synced *before* release this 
time :)

-bob

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org