Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is this Unicode printable?
#1
given a Unicode character (a str of len() == 1 or maybe an int that can be used with chr()) how can the code determine if it is printable? how small could a pythonic is_printable(ch) be?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
It's built-in Big Grin
test = chr (7)

print (test.isprintable ())
Reply
#3
ah, i tried that the wrong way and misconcluded that it was not there. thanks!
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  email Library: properly send message as quoted-printable malonn 3 1,342 Nov-14-2022, 09:31 PM
Last Post: malonn
  print is showing non printable characters turtleman 5 3,212 May-05-2019, 10:08 PM
Last Post: snippsat
  clean unicode string to contain only characters from some unicode blocks gmarcon 2 3,991 Nov-23-2018, 09:17 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020