[Pythonmac-SIG] bundlebuilder question: snack (tcl extension)

Russell E Owen rowen at u.washington.edu
Mon Sep 13 18:38:40 CEST 2004


At 1:55 AM +0900 2004-09-12, Jack Jansen wrote:
>On 10 Sep 2004, at 01:52, Russell E Owen wrote:
>>  Also, any suggestions for a better sound package. All I want to do 
>>is play sound queues in a Tkinter-based Python application. (Thus 
>>all I want to do is play sound files asynchronously). Snack seems 
>>to work, but installation is a bit of a pain.
>
>My first choices would be Sound Manager (Carbon.Snd) or quicktime 
>(Carbon.Qt). Sound Manager should not interfere with Tkinter (at 
>least, I can't see how it could), but it's a rather old toolbox (and 
>so is the Python interface) so it can be a bit quirky to get 
>working. But there are examples. Actually, I think the Audio_mac 
>module (in Lib/plat-mac) may already do what you want, just make 
>sure you keep it fed with enough samples (for example in a Tkinter 
>timer callback). If it doesn't do the right thing it's a good 
>example anyway. Caveat: I haven't used this module in a long time, 
>and I'm not sure anyone else ever did.
>
>QuickTime needs to be told not to open visual elements (such as it's 
>playback control panel), and then it should be fine with Tkinter too.

Thank you very much for the kind reply. Unfortunately, I think I was 
not clear enough in my question. My application is cross-platform 
(with mostly unix users, some MacOS X users and a few hardy Windows 
pioneers). So I need cross-platform sound.

For what it's worth, I found by trial and error that copying 
/Library/Tcl/snack2.2/ to 
Contents/Frameworks/Tcl.Framework/Resources/snack2.2/ did the trick 
as far as the bundled Tcl/Tk seeing the bundled snack. In my 
bundlebuilder script I use (again, after trial and error; I wish 
these arguments were documented, since translating from the 
command-line arguments to buildapp function call arguments is not 
always obvious):

files = [
	("/Library/Tcl/snack2.2", 
"Contents/Frameworks/Tcl.Framework/Resources/snack2.2"),
]

Anyway, life is good.

Dethe Elza suggested I consider PyGame. My recollection is there is 
some trickiness involved in bundling PyGame apps, but I am definitely 
keeping PyGame in mind for a future change in the code.

-- Russell


More information about the Pythonmac-SIG mailing list