Allow 'threads_per_letter' to be specified
Fix import error on Python 2