Here is the hilariously slow and inefficient method of calling exiftool on the command line using subprocess.check_output. Not my finest hour, but it works:
import matplotlib.pyplot as plt
import subprocess, glob, re
def get_magnification(filename):
p = subprocess.check_output('exiftool -tab %s'%filename,shell=True)
xpix = float(re.findall('XpixCal=\d*.\d*',p)[0][8:])
ypix = float(re.findall('YpixCal=\d*.\d*',p)[0][8:])
mag = int(re.findall('p.\d+',p)[0][2:])
return xpix,ypix,mag
xpix,ypix,mag = get_magnification('E3-9.tif')
print 'X pixels per nm: %.3f'%(xpix)
print 'Y pixels per nm: %.3f'%(ypix)
print 'Magnification: %ix'%(mag)