ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> edu-sig
edu-sig
Re: [Edu-sig] Snack question
by John Zelle other posts by this author
Jul 22 2004 2:57AM messages near this date
[Edu-sig] Snack question | Re: [Edu-sig] Snack question
I've only tried to use snack once and had a similar problem playing 
sound files (although I did get it to generate nice tones). I resorted 
to using an external command for playing sound files (I use artsplay, 
because I run artsd for my sound system under Linux). I just  used 
os.system() to fork the sound playing commands. Unfortunately, it's not 
portable, but it was quick and easy. I needed it as a replacement for 
Winsound on Linux.

--John

billwinn@[...].edu wrote:

> I'm a novice Python programmer who wants to use Snatch. I have everything installed correct
ly as far as I can tell. But when I try to play something I get an error that says I failed 
to set the number of channels. Here's what I get:
> 
>   
> 
> >>>from Tkinter import *
> >>>root = Tk()
> >>>import tkSnack
> >>>tkSnack.initializeSnack(root)
> >>>snd=tkSnack.Sound()
> >>>snd.read('/usr/games/chromium/data/wav/music_game.wav')
> >>>snd.play()
> >>>        
> >>>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.2/site-packages/tkSnack.py", line 277, in play
>     self.tk.call((self.name, 'play') + self._options(kw))
> TclError: Failed setting number of channels.
> 
> Any help will be most welcome.
> 
> Thanks,
> 
> Bil
> 
> ***************************************************************
> *  William Winn,                                              *
> *  412 Miller, College of Education, Box 353600,              *
> *  University of Washington, Seattle, WA, 98195, USA.         *
> *  206 685-1185, FAX 206 543-8439, billwinn@[...].edu  *
> ***************************************************************
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@[...].org
> http://mail.python.org/mailman/listinfo/edu-sig
> 
> 
>   
> 
_______________________________________________
Edu-sig mailing list
Edu-sig@[...].org
http://mail.python.org/mailman/listinfo/edu-sig
Thread:

John Zelle
Rodrigo Dias Arruda Senra

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved