Comment 0 for bug 959908

Revision history for this message
Hobson Lane (hobs) wrote :

Per discussion of Bug #942595 it would be nice to be able to display EXIF "Undefined" strings without garbling a terminal with control codes or ValueError faulting on non-ascii characters, e.g. ord()>128

Ideally, the following code should display human-readable text,

 exif = im.exif_keys
 for k in im.exif_keys:
  print "{0}: {1}".format(k,str(im[k].value))
 print '------------- Comment -------------------'
 print im.comment
 print '-----------------------------------------------'

However, even with these new utils, until they are incorporated into the python string output interface for exif tag classes ( ExifTag.convert_to_python() ), the provided utils will not help. A separate branch on launchpad will be provided that incorporates these utils into ExifTag.convert_to_python() so that prints "don't surprise"