ó
_y]c           @   s2   d  Z  d d l Z e j d d k Z d „  Z d S(   s   QString compatibility.iÿÿÿÿNi    t   2c         C   sP   t  r t |  ƒ S|  j d ƒ } t | ƒ d } | d  d k rL | d 8} n  | S(   sP   
    Tries to compute what the length of an utf16-encoded QString would be.
    t   utf16i   s   ÿþs   ÿÿs   þÿi   (   s   ÿþs   ÿÿs   þÿ(   t   PY2t   lent   encode(   t   textt
   utf16_textt   length(    (    s7   lib/python2.7/site-packages/qtconsole/qstringhelpers.pyt   qstring_length   s    
(   t   __doc__t   syst   versionR   R   (    (    (    s7   lib/python2.7/site-packages/qtconsole/qstringhelpers.pyt   <module>   s   