[SciPy-dev] Some Q's vis-a-vis Numpy unicode support
David Goldsmith
d_l_goldsmith at yahoo.com
Tue Aug 18 12:18:22 EDT 2009
Thanks!
DG
--- On Tue, 8/18/09, Scott David Daniels <Scott.Daniels at Acm.Org> wrote:
> From: Scott David Daniels <Scott.Daniels at Acm.Org>
> Subject: Re: [SciPy-dev] Some Q's vis-a-vis Numpy unicode support
> To: scipy-dev at scipy.org
> Date: Tuesday, August 18, 2009, 8:27 AM
> More tools to explore unicode:
> unicodedata.name
> sys.maxunicode
>
> >>> import unicodedata
> >>> for n in xrange(32, 300):
> ch = unichr(n)
> if ch.lower() == ch.upper():
> print n,
> unicodedata.name(ch, 'Unknown')
>
> >>> text = u'\N{COLON}\N{COPYRIGHT
> SIGN}\N{INVERTED QUESTION MARK}'
> >>> print len(text)
> 3
> >>> [ord(ch) for ch in text]
> [58, 169, 191]
>
> --Scott David Daniels
> Scott.Daniels at Acm.Org
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
More information about the SciPy-Dev
mailing list