1. python_mirrors
  2. releasing/2.7.3

Source

releasing/2.7.3 / Lib / imghdr.py

Author Commit Message Date Builds
Benjamin Peterson
Merged revisions 65713 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65713 | benjamin.peterson | 2008-08-16 11:29:02 -0500 (Sat, 16 Aug 2008) | 1 line #3424 rearrange the order of tests in imghdr to place more common types first ........
Georg Brandl
Merged revisions 65012,65035,65037-65040,65048,65057,65077,65091-65095,65097-65099,65127-65128,65131,65133-65136,65139,65149-65151,65155,65158-65159,65176-65178,65183-65184,65187-65190,65192,65194 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65012 | jesse.noller | 2008-07-16 15:24:06 +0200 (Wed, 16 Jul 2008) | 2 lines Apply patch for issue 3090: ARCHFLAGS parsing incorrect ........ r65035 | georg.brandl | 2008-07-16 23:19:28 +0200 (Wed, 16 Jul 2008) | 2 lines #3045: fix pydoc behavior for TEMP path with spaces. ........ r65037 | georg.brandl | 2008-07-16 23:31:41 +0200 (Wed, 16 Jul 2008) | 2 lines #1608818: er…
Benjamin Peterson
#3424 rearrange the order of tests in imghdr to place more common types first
Branches
legacy-trunk
Benjamin Peterson
use isinstance
Branches
legacy-trunk
Guido van Rossum
Improved patches for sndhdr and imghdr by Victor Stinner, who writes: - 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')
Barry Warsaw
Compare what's read from files against proper byte literals. Neither of these 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.
Guido van Rossum
Fix most trivially-findable print statements. 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.)
Raymond Hettinger
SF #75103: imghdr -- identify JPEGs in EXIF format
Branches
legacy-trunk
smontanaro
a few more modules get __all__
Branches
legacy-trunk
Tim Peters
Whitespace normalization.
Branches
legacy-trunk
Guido van Rossum
More trivial comment -> docstring transformations by Ka-Ping Yee, who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. Th…
Branches
legacy-trunk
Guido van Rossum
Allow open file as parameter (must be seekable) (Jack)
Branches
legacy-trunk
Guido van Rossum
(Jack:) Recognize PNG files.
Branches
legacy-trunk
Guido van Rossum
imghdr.what(): check for not h'. This lets you do: imghdr.what(None, '') And still go down the
Branches
legacy-trunk
Guido van Rossum
Added optional second arg to what(), giving the data read from the file (then f may be None).
Branches
legacy-trunk
Guido van Rossum
* calendar.py: all libC functionality now moved to built-in time module * imghdr.py: added jpeg recognition * torgb.py: added jpeg conversion * tzparse.py: use functions from time instead of calendar * whatsound.py: add /ufs/guido/biin/sgi to $PATH when calling 'whatsound'
Branches
legacy-trunk
Guido van Rossum
Misc changes and new modules. whrandom is "objectified". SOCKET.py is moved to the sgi subdirectory.
Branches
legacy-trunk
Guido van Rossum
Fix pnm test for short files and add X bitmap as recognized type
Branches
legacy-trunk
Guido van Rossum
Initial revision
Branches
legacy-trunk