[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] File-like objects and mixer.Sound



> I can't seem to get file-like objects (specifically StringIO) to
> work with pygame.mixer.Sound(). Transcript:
> 
> I'm not sure what's supposed to happen here, or whether I'm doing
> something wrong, but I *am* sure that it's not supposed to segfault,
> it's supposed to give me a traceback :) Any suggestions? I'm
> using the Debian pygame 1.0 package on a Debian woody system -- I
> can provide other version numbers or whatever on request.

hi aquarius, this was a bug in the 1.0 release. if you grab 
the code from cvs, you'll see it's been fixed up.

also, in you code, you should use "file = open(...).read()"
not readlines. the StringIO object works over a single
string representing the entire data. readlines() returns
a list of strings, and i'm sure the results are pretty odd
with a binary file. (i'm surprised that didn't give a
python error?)

checking the "WhatsNew" log ( http://www.pygame.org/WhatsNew )
it shows that this was fixed back on April 30th. thanks for the
bug report though, if this was the first i'd heard about this
problem i'd be going into "maintainer panic mode" :]



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org