summaryrefslogtreecommitdiff
path: root/Lib/sndhdr.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24878: Add docstrings to selected namedtuplesRaymond Hettinger2015-08-171-0/+12
|
* #18615: Make sndhdr return namedtuples.R David Murray2014-10-091-1/+6
| | | | Patch by Claudiu Popa.
* #5024: whichhdr now returns the frame count for WAV files.R David Murray2013-03-181-5/+8
| | | | Patch by Ned Jackson Lovely based on a suggestion by Robert Pyle.
* Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
|
* Merged revisions 82856-82857 via svnmerge fromVictor Stinner2010-07-131-4/+4
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82856 | victor.stinner | 2010-07-14 01:04:56 +0200 (mer., 14 juil. 2010) | 2 lines Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee. ........ r82857 | victor.stinner | 2010-07-14 01:08:01 +0200 (mer., 14 juil. 2010) | 2 lines Woops, test_sndhdr.py contains the same code twice: fix it ........
* Improved patches for sndhdr and imghdr by Victor Stinner, who writes:Guido van Rossum2007-08-131-14/+23
| | | | | | | | - fix "h[sbseek] == b'\1'" and "ratecode = ord(h[sbseek+4])" in test_voc() - avoid division by zero - use startswith method: replace h[:2] == b'BM' by h.startswith(b'BM') - use aifc.open() instead of old aifc.openfp() - use ord(b'P') instead of ord('P')
* Compare what's read from files against proper byte literals. Neither of theseBarry Warsaw2007-08-121-46/+46
| | | | | | | | | | | | | modules have unittests AFAICT, and I'm not improving things here, but these changes make a bunch of email package tests succeed, and command line testing against real files seems to make things better. Added an __main__ section to imghdr.py so that it can be run from the command line similarly to sndhdr.py. Someone else can figure out a better -m way of doing this. In sndhdr.py do a couple of very minor cleanups, and use a with statement to not wait for gc to close the file.
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-6/+6
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Amazing. This would open the sound file in text mode. Fixed.Guido van Rossum2001-07-311-1/+1
| | | | SF bug #446219.
* bunch more __all__ listsSkip Montanaro2001-02-151-0/+1
| | | | | | also modified check_all function to suppress all warnings since they aren't relevant to what this test is doing (allows quiet checking of regsub, for instance)
* Whitespace normalization.Tim Peters2001-01-151-120/+120
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-5/+5
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Move brief descriptions of what() and whathdr() to docstrings in theFred Drake1999-01-061-8/+2
| | | | functions (from comments).
* Got rid of whatraw().Guido van Rossum1999-01-061-72/+35
| | | | | Doc-string-ified the lead comments. Added auto call of test() when run as script.
* sndhdr.py: restored lost file; audiodev.py: import platform specificGuido van Rossum1994-01-141-0/+270
modules only when needed