diff options
Diffstat (limited to 'Mac/Demo/imgbrowse/mac_image.py')
-rw-r--r-- | Mac/Demo/imgbrowse/mac_image.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Mac/Demo/imgbrowse/mac_image.py b/Mac/Demo/imgbrowse/mac_image.py index 9c9eeb7..75baff4 100644 --- a/Mac/Demo/imgbrowse/mac_image.py +++ b/Mac/Demo/imgbrowse/mac_image.py @@ -38,19 +38,19 @@ def dumppixmap(data): cmpCount, cmpSize, \ planeBytes, pmTable, pmReserved \ = struct.unpack("lhhhhhhhlllhhhhlll", data) - print 'Base: 0x%x'%baseAddr - print 'rowBytes: %d (0x%x)'%(rowBytes&0x3fff, rowBytes) - print 'rect: %d, %d, %d, %d'%(t, l, b, r) - print 'pmVersion: 0x%x'%pmVersion - print 'packing: %d %d'%(packType, packSize) - print 'resolution: %f x %f'%(float(hRes)/0x10000, float(vRes)/0x10000) - print 'pixeltype: %d, size %d'%(pixelType, pixelSize) - print 'components: %d, size %d'%(cmpCount, cmpSize) - print 'planeBytes: %d (0x%x)'%(planeBytes, planeBytes) - print 'pmTable: 0x%x'%pmTable - print 'pmReserved: 0x%x'%pmReserved + print('Base: 0x%x'%baseAddr) + print('rowBytes: %d (0x%x)'%(rowBytes&0x3fff, rowBytes)) + print('rect: %d, %d, %d, %d'%(t, l, b, r)) + print('pmVersion: 0x%x'%pmVersion) + print('packing: %d %d'%(packType, packSize)) + print('resolution: %f x %f'%(float(hRes)/0x10000, float(vRes)/0x10000)) + print('pixeltype: %d, size %d'%(pixelType, pixelSize)) + print('components: %d, size %d'%(cmpCount, cmpSize)) + print('planeBytes: %d (0x%x)'%(planeBytes, planeBytes)) + print('pmTable: 0x%x'%pmTable) + print('pmReserved: 0x%x'%pmReserved) for i in range(0, len(data), 16): for j in range(16): if i + j < len(data): - print '%02.2x'%ord(data[i+j]), - print + print('%02.2x'%ord(data[i+j]), end=' ') + print() |