decrgx = re.compile('\\d+(%s\\d+)?e(-|\\+)(\\d+)' % dec_pt)
if decrgx.search(foo):
    raise NotImplementedError('e notation not implemented')
else:
    digits = len(foo.split(dec_pt)[-1])
Easy way of finding decimal places