[Tutor] string.unprintable?

Clay Shirky clay at shirky.com
Sun Nov 23 13:37:53 EST 2003

> if printable.search(line):
>  # do it here.
> else:  
>  # or not

Right, though this is different loop logic than the operation calls for.
This is "If a line has any printable characters, do something", but I need
"If a line has any unprintable characters, do something", which means
building a big weird regex.

I had hoped that there would be string.unprintable, or some easy way to
derive it from string.printable, but it looks like the regex is the way to


More information about the Tutor mailing list