C's isprint() concept?

Jeff Blaine jblaine at shell2.shore.net
Sun Aug 15 16:54:32 EDT 1999


If I want to replace all non-printable characters in a string with a single
space, what would be the best way?  Do I need to loop over the entire string
character by character checking the ord() value of each one?  Anyone have
a sane way to do this with regular expressions?

[ C has isprint() and isgraph() macros ]

Thanks for any help




More information about the Python-list mailing list