Question about string.printable and non-printable characters

Sibylle Koczian Sibylle.Koczian at Bibliothek.Uni-Augsburg.de
Mon Mar 21 13:34:40 CET 2005


Michael Hoffman schrieb:
> string.printable is a least-common denominator ASCII set. You can certainly
> make it string.printable + "aeioun" (replacing the ASCII letters with their
> accented versions in your codeset of course).
> 
There is something I don't understand about string.printable: on the one 
hand the library reference says "This is a combination of digits, 
letters, punctuation, and whitespace." The value of string.letters is 
locale-dependent, so string.printable should change as well after 
calling locale.setlocale(). But it doesn't.

But you could always call locale.setlocale() and afterwards combine your 
"printable" string yourself.

-- 
Dr. Sibylle Koczian
Universitaetsbibliothek, Abt. Naturwiss.
D-86135 Augsburg

Tel.: (0821) 598-2400, Fax : (0821) 598-2410
e-mail : Sibylle.Koczian at Bibliothek.Uni-Augsburg.DE



More information about the Python-list mailing list