How to check...

Daniel Marcel Eichler shirow at gmx.net
Sat Feb 11 11:19:53 EST 2006


Lad wrote:

>How can I  check that a string does NOT contain NON English characters?

try:
    foobar.encode('ascii')
except:
    bla

or use string.ascii_letters and enhance it.


mfg

Daniel



More information about the Python-list mailing list