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

[pygame] Embedding pygame into wxPython



Hi

I'd like to embed a pygame surface into a wxPython-Panel. With the code
from [1] it's no big deal.

The attached code works on WinXP and W2k with Python 2.4.2 and pygame
1.7.1. And it works on WinXP with Python 2.3.5 and pygame 1.6. 

But on W2k it crashes with Python 2.3.5 and pygame 1.6 with the
following error:

---snip---
Pygame Parachute Traceback:
  File "simple_pygame.py", line 15, in __init__
Fatal Python error: (pygame parachute) Segmentation Fault

abnormal program termination
---snap---

Of course it doesn't crash, if I remove line 12
    os.environ['SDL_WINDOWID'] = str(wndCam.GetHandle())
    
If I remove line 15
    pygame.display.set_mode((640, 480))
it gives this error:

---snip---
Pygame Parachute Traceback:
  File "C:\PROGRA~1\Python23\Lib\site-packages\wx-2.6-msw-un
icode\wx\_core.py", line 8731, in Show
---snap---

If I remove the lines 15&21
    pygame.display.set_mode((640, 480))
    ...
    frame.Show()
it doesn't give a error, but of course than the app doesn't show
anything.


Is there any reason, why there is no precompiled version of pygame 1.7.1
for python 2.3? And how do I unfailing embed a pygame surface into a
wxPython-app with Python 2.3? Are there other obstacles that I have to
respect?


Thanks for your help
cu boesi


[1] http://wiki.wxpython.org/index.cgi/IntegratingPyGame

PS: I'm using wxPython 2.6.3.2 on all systems

Attachment: simple_pygame.py
Description: Binary data