On Thu, Sep 10, 2009 at 6:00 AM, Tristam MacDonald<[email protected]> wrote:
>
>
> On Thu, Sep 10, 2009 at 7:20 AM, Tristam MacDonald <[email protected]>
> wrote:
>>
>> On Thu, Sep 10, 2009 at 5:40 AM, Jon <[email protected]> wrote:
>>>
>>> does the cocoa api run in the 64bit python? ie is it just carbon that
>>> is deprecated?
>>> If so then generating a 64bit pyglet for snow leopard might not be too
>>> hard. A lot of the carbon functions that pyglet uses seem to be
>>> available and identical in cocoa (eg. CGDisplayBounds,
>>> CFStringCreateWithCString).
>>>
>>> Can someone with snow leopard try this in the 64bit python?:
>>> import ctypes, ctypes.util
>>> cocoa=ctypes.cdll.LoadLibrary(ctypes.util.find_library("Cocoa"))
>>> cocoa.CGDisplayBounds
>>>
>>> if it works it will say something like <_FuncPtr object at 0x7af80>
>>>
>>> Jon Peirce
>>
>> That sort of stuff is all part of Quartz (in this case CoreGraphics),
>> which is implemented in C anyway. The problem is that Cocoa is implemented
>> in Objective-C, and you need Cocoa for windowing and events.
>>
>> One can access Cocoa from Python using PyObjC, but unfortunately this
>> brings problems of its own. For one thing, you wouldn't be able to run
>> pyglet from the command prompt (PyObjC only works from properly constructed
>> app bundles).
>
> Actually, it looks as if we can subvert PyObjC to run without a bundle. If
> someone else on Leopard/Snow leopard could confirm this test application
> runs as is, I would be grateful.

Works for me with the Leopard system python.

-Casey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to