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

[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:

[ aquarius@giles ] ~/src/python/katalyst-player $ python2
Python 2.0 (#0, Apr 14 2001, 21:24:22) 
[GCC 2.95.3 20010219 (prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import pygame
>>> import StringIO
>>> import pygame.mixer
>>> file = open("/home/aquarius/misc/sounds/newmail/sensemail.wav").readlines()
>>> fobj = StringIO.StringIO(file)
>>> pygame.init()
(4, 0)
>>> pygame.mixer.init()
>>> snd = pygame.mixer.Sound(fobj)
Fatal Python error: Segmentation Fault
Aborted
[ aquarius@giles ] ~/src/python/katalyst-player $ 

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.

Cheers,

Aquarius

-- 
from string import *;import re,base64;w=base64.decodestring("YXF1YXJp"+
"dXNAa3J5b2dlbml4Lm9yZw==");u='['+lowercase+']';print re.sub(u,'-',w)
while filter(lambda x: x in u,w): s=raw_input('Letter:');u=filter\
(lambda x: x != s,u);print re.sub(u,'-',w)


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