[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame from OS X command line




On Aug 3, 2005, at 6:47 PM, Ben Willmore wrote:

I was excited to see on Bob Ippolito's website that he has updated OS X pygame so it will run without either pythonw or being in an app bundle. However, I found when running pygame (today's CVS) from fink python2.4, I got the following error:

---
[ben@assam ben] $ python2.4
Python 2.4.1 (#1, Aug 2 2005, 23:12:54)
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame.init()
>>> pygame.init()
(6, 0)
>>> screen = pygame.display.set_mode((468, 60))
2005-08-03 21:37:01.917 python2.4[26902] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow
Trace/BPT trap

The actual problem is that you're spending too much time before creating the screen... your fix works around that problem by calling NSApplicationLoad on import, but it breaks the detection that goes on later in pygame.macosx to see if pygame is already running in the context of an application and will break other things.


Try this instead, with no patch:
python -i -c "import pygame; pygame.init()"

-bob