[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Sound to Light
Alex Holkner wrote:
Chris Ashurst wrote:
Okay, I think I grasp that... Except for the pygame-ctypes part. Is
that a
separate branch of pygame from the main download?
Yes, it's a reimplementation of Pygame written entirely in Python,
rather than as a C extension. Latest version and documentation is at
http://www.pygame.org/ctypes. Pretty much feature complete at the
moment, just fixing bugs.
Alex.
Alex - I'm having trouble with your pygame-ctypes.
First off - it installs into lib/site-packages/pygame? doesn't this
mean it conflicts with regular pygame?
(I don't have regular pygame installed right now)
Second - I installed pygame-ctypes using 'pygame setup.py install'
The original 'pygame-ctypes-0.07' directory is on my desktop, and it
copied files into
'C:/python24/Lib/site-packages/pygame' and
'C:/python24/Lib/site-packages/SDL'
Whenever I ran the example programs in 'desktop/pygame-ctypes-0.07/test'
I saw this error message pop up and disappear, so I
went into a cmd prompt and ran it so I could see the error message, and
it was
File "C:\Documents and
Settings\Rabidpoobear\Desktop\pygame-ctypes-0.07\test\checkkeys.py",
line 14, in ?
from SDL import *
File "C:\python24\Lib\site-packages\SDL\__init__.py", line 30, in ?
import SDL.dll
File "C:\python24\Lib\site-packages\SDL\dll.py", line 217, in ?
_dll = SDL_DLL('SDL','SDL_Linked_Version')
File "C:\python24\Lib\site-packages\SDL\dll.py", line 42, in __init__
self._dll = getattr(cdll, find_library(library_name))
TypeError: getattr(): attribute name must be string
Now that I think about it more, I'm guessing that
find_library(library_name) is returning None instead
of the library location because I don't have SDL installed.
So what I'm wondering is, if I just install SDL and SDL_image, mixer,
ttf, and sound, using the
windows installers, is it going to add it to the path for me so
pygame-ctypes will find it?
Also, I know it should be self-explanatory for a programmer such as
myself that a
ctypes module that wraps a C dll would need the C dll to be present
somewhere,
but obviously I was confused long enough to start writing an e-mail to you.
Perhaps it's because I just woke up ;)
Anyway, maybe you should put a 'Don't forget to install SDL and ctypes!'
on the
front page.
I'm kind of embarrassed now.
-Luke