參考:http://stackoverflow.com/questions/3636928/test-if-a-python-string-is-printable
print all(ord(c)<127and c in string.printable for c in input_str)