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 >> pythoncard
pythoncard
[Pythoncard-users] bug in sound.py
by Richard Wolff other posts by this author
Apr 21 2002 10:43PM messages near this date
RE: [Pythoncard-users] what is the syntax for posting an event? | RE: [Pythoncard-users] bug in sound.py
In sound.py:_soundType, if the filename path has more than one period, 
as in, say, c:\Python2.2\x\y\noise.wav, the function fails.

fix: change    name,ext = filename.split('.')
to
    ext = filename.split('.')[-1]

However, the standard python library module 'sndhdr' is a more general 
approach to what _soundType is doing.  Thus, the above change led me to 
a more extensive rewrite.  Suggested new sound.py (from 
site-packages/PythonCardPrototype) and new samples/sounds/sounds.py are 
attached.

Richard
Attachments:
sound.py
sounds.py

Thread:
Richard Wolff
Kevin Altis

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