Python 3 compatibility for print_ascii; fix version bounds checking

chr() in python 3 takes a Unicode ordinal.