On 15 Mar 2005 04:55:17 -0800, rumours say that "Xah Lee" <[EMAIL PROTECTED]> 
might
have written:

>how do i get a unicode's number?
>
>e.g. 03ba for greek lowercase kappa? (or in decimal form)

you get the character with:

.>> uc = u"\N{GREEK SMALL LETTER KAPPA}"

or with

.>> uc = unicodedata.lookup("GREEK SMALL LETTER KAPPA")

and you get the ordinal with:

.>> ord(uc)

ord works for strings and unicode.
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to