On Thu, Sep 10, 2009 at 5:40 AM, Jon <[email protected]> wrote:

>
> On Sep 9, 6:51 pm, Tristam MacDonald <[email protected]> wrote:
> > On Wed, Sep 9, 2009 at 1:47 PM, Nathan <[email protected]> wrote:
> >
> > > I'm pulling my hair out here.  Snow Leopard just does not like pyglet!
> > >  Can anyone point me in the right direction?  I have no idea what to
> > > do about dlopen() errors.
> >
> > Pyglet unfortunately is incompatible with Snow Leopard's system python.
> > Snow Leopard ships with a 64-bit build of python, and because pyglet
> depends
> > on the Carbon API, it cannot run in 64-bit environment.
> >
> > You can download and install a 32-bit version of python from python.org,
> > which should allow pyglet to run.
> >
>
> 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).

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
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