summaryrefslogtreecommitdiffstats
path: root/Lib/sndhdr.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee.Victor Stinner2010-07-131-4/+4
|
* 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