[SciPy-dev] Some Q's vis-a-vis Numpy unicode support

David Goldsmith d_l_goldsmith@yahoo....
Tue Aug 18 11:18:22 CDT 2009


Thanks!

DG

--- On Tue, 8/18/09, Scott David Daniels <Scott.Daniels@Acm.Org> wrote:

> From: Scott David Daniels <Scott.Daniels@Acm.Org>
> Subject: Re: [SciPy-dev] Some Q's vis-a-vis Numpy unicode support
> To: scipy-dev@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@Acm.Org
> 
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
> 


      


More information about the Scipy-dev mailing list