Training, Open Source computer languages

This is page http://www.wellho.net/forum/Programm ... -Ruby/Game-Programming-with-Python-trouble.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Game Programming with Python trouble

Posted by kudu (kudu), 23 October 2005
Hi,

Whilst I realize the book's focus is on Windows, I'm trying to get the example programs running on my Linux box. I'm stumbling on the lack of WGL__init__.

Here's what I get:

>>> Running '/home/kudu/python/gpwp/chapter4/main.py' ...
Traceback (most recent call last):
 File "/usr/lib/python2.4/site-packages/_spe/sm/scriptutils.py", line 49, in run
   exec codeObject in mainDict
 File "<source>", line 49, in ?
 File "<source>", line 43, in run
 File "/usr/lib/python2.4/site-packages/pyui/core.py", line 65, in init
   from renderers.openglPygame import OpenGLPygame
 File "/usr/lib/python2.4/site-packages/pyui/renderers/openglPygame.py", line 25, in ?
   from pyui.renderers import openglBase
 File "/usr/lib/python2.4/site-packages/pyui/renderers/openglBase.py", line 49, in ?
   from OpenGL.WGL import wglUseFontBitmaps, wglGetCurrentDC
 File "/usr/lib/python2.4/site-packages/OpenGL/WGL/__init__.py", line 2, in ?
   from WGL__init__ import *
ImportError: No module named WGL__init__
Exception raised while running script  <source>
>>>

Is there any way to get the example code running on my setup ??

Thanks!
kudu

Posted by admin (Graham Ellis), 25 October 2005
I'm on thin ice here, but it looks to me that this is a Windows Open GL call from within pyopengl.  In which case, your solution is likely to be a configuration change or different version of that module which calls the Linux / X windows equivalents. I see from the top page of the Pyopengl documentation that it builds on quite a range of lower level graphics drivers, of which WGL is but one.

Posted by kudu (kudu), 25 October 2005
Hi Graham,

Yes you're right. I got it sorted by hashing out the offending line that calls WGL __ini__, which has to do with loading Windows fonts if running in Windows OS. But since I'm not running on Windows and that module doesn't therefore exist it puked. Now it runs correctly.

Thank you for responding, very much appreciated.

Cheers!



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho