/opt/cloudlinux/venv/lib/python3.11/site-packages/wcwidth/__pycache__
NameSizeModeActions
table_wide.cpython-311.pyc78550644editdlrm
table_zero.cpython-311.pyc237090644editdlrm
unicode_versions.cpython-311.pyc9630644editdlrm
wcwidth.cpython-311.pyc135910644editdlrm
__init__.cpython-311.pyc6590644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/wcwidth/__pycache__/wcwidth.cpython-311.pyc (13591B)
§ ´ÖDŠÕÝãóR—dZddlmZddlZddlZddlZddlmZddlm Z ddl m Z  ddl m Z n#e$r ddlm Z YnwxYwdZejdd kZegd ¢¦«Zd „Ze d ¬ ¦«dd„¦«Zdd„Ze d¬ ¦«d„¦«Ze d¬ ¦«d„¦«ZdS)aë This is a python implementation of wcwidth() and wcswidth(). https://github.com/jquast/wcwidth from Markus Kuhn's C code, retrieved from: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c This is an implementation of wcwidth() and wcswidth() (defined in IEEE Std 1002.1-2001) for Unicode. http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html In fixed-width output devices, Latin characters all occupy a single "cell" position of equal width, whereas ideographic CJK characters occupy two such cells. Interoperability between terminal-line applications and (teletype-style) character terminals using the UTF-8 encoding requires agreement on which character should advance the cursor by how many cell positions. No established formal standards exist at present on which Unicode character shall occupy how many cell positions on character terminals. These routines are a first attempt of defining such behavior based on simple rules applied to data provided by the Unicode Consortium. For some graphical characters, the Unicode standard explicitly defines a character-cell width via the definition of the East Asian FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. In all these cases, there is no ambiguity about which width a terminal shall use. For characters in the East Asian Ambiguous (A) class, the width choice depends purely on a preference of backward compatibility with either historic CJK or Western practice. Choosing single-width for these characters is easy to justify as the appropriate long-term solution, as the CJK practice of displaying these characters as double-width comes from historic implementation simplicity (8-bit encoded characters were displayed single-width and 16-bit ones double-width, even for Greek, Cyrillic, etc.) and not any typographic considerations. Much less clear is the choice of width for the Not East Asian (Neutral) class. Existing practice does not dictate a width for any of these characters. It would nevertheless make sense typographically to allocate two character cells to characters such as for instance EM SPACE or VOLUME INTEGRAL, which cannot be represented adequately with a single-width glyph. The following routines at present merely assign a single-cell width to all neutral characters, in the interest of simplicity. This is not entirely satisfactory and should be reconsidered before establishing a formal standard in this area. At the moment, the decision which Not East Asian (Neutral) characters should be represented by double-width glyphs cannot yet be answered by applying a simple rule from the Unicode database content. Setting up a proper standard for the behavior of UTF-8 character terminals will require a careful analysis not only of each Unicode character, but also of each presentation form, something the author of these routines has avoided to do so far. http://www.unicode.org/unicode/reports/tr11/ Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c é)ÚdivisionNé)ÚWIDE_EASTASIAN)Ú ZERO_WIDTH)Ú list_versions)Ú lru_cacheé)riOi i i i i i( i) i* i+ i, i- i. i` ia ib ic có—d}t|¦«dz }||ddks|||dkrdS||kr@||zdz}|||dkr|dz}n|||dkr|dz }ndS||k°@dS)aJ Auxiliary function for binary search in interval table. :arg int ucs: Ordinal value of unicode character. :arg list table: List of starting and ending ranges of ordinal values, in form of ``[(start, end), ...]``. :rtype: int :returns: 1 if ordinal value ucs is found within lookup table, else 0. rré)Úlen)ÚucsÚtableÚlboundÚuboundÚmids úa/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/wcwidth/wcwidth.pyÚ _bisearchrrs±€ð€FÝ �‰ZŒZ˜!‰^€Fà ˆU�1ŒX�aŒ[ÒИC %¨¤-°Ô"2Ò2Ð2؈qØ �FÒ Ð Ø˜‰ 1Ñ$ˆØ ��s”˜A”Ò Ð Ø˜1‘WˆFˆFØ �5˜”:˜a”=Ò Ð Ø˜1‘WˆFˆFà�1ð �FÒ Ð ð ˆ1óiè)ÚmaxsizeÚautocóú—t|¦«}|tvrdS|dksd|cxkrdkrnndSt|¦«}t|t|¦«rdSdt|t |¦«zS)a  Given one Unicode character, return its printable length on a terminal. :param str wc: A single Unicode character. :param str unicode_version: A Unicode version number, such as ``'6.0.0'``, the list of available version levels may be listed by pairing function :func:`list_versions`. Any version string may be specified without error -- the nearest matching version is selected. When ``latest`` (default), the highest Unicode version level is used. :return: The width, in cells, necessary to display the character of Unicode string character, ``wc``. Returns 0 if the ``wc`` argument has no printable effect on a terminal (such as NUL '\0'), -1 if ``wc`` is not printable, or has an indeterminate effect on the terminal, such as a control character. Otherwise, the number of column positions the character occupies on a graphic terminal (1 or 2) is returned. :rtype: int The following have a column width of -1: - C0 control characters (U+001 through U+01F). - C1 control characters and DEL (U+07F through U+0A0). The following have a column width of 0: - Non-spacing and enclosing combining characters (general category code Mn or Me in the Unicode database). - NULL (``U+0000``). - COMBINING GRAPHEME JOINER (``U+034F``). - ZERO WIDTH SPACE (``U+200B``) *through* RIGHT-TO-LEFT MARK (``U+200F``). - LINE SEPARATOR (``U+2028``) *and* PARAGRAPH SEPARATOR (``U+2029``). - LEFT-TO-RIGHT EMBEDDING (``U+202A``) *through* RIGHT-TO-LEFT OVERRIDE (``U+202E``). - WORD JOINER (``U+2060``) *through* INVISIBLE SEPARATOR (``U+2063``). The following have a column width of 1: - SOFT HYPHEN (``U+00AD``). - All remaining characters, including all printable ISO 8859-1 and WGL4 characters, Unicode control characters, etc. The following have a column width of 2: - Spacing characters in the East Asian Wide (W) or East Asian Full-width (F) category as defined in Unicode Technical Report #11 have a column width of 2. - Some kinds of Emoji or symbols. ré éé éÿÿÿÿr)ÚordÚ ZERO_WIDTH_CFÚ_wcmatch_versionrrr)ÚwcÚunicode_versionr Ú_unicode_versions rÚwcwidthr"�s›€õD ˆb‰'Œ'€CØ �mÐÐØˆqð ˆR‚x€x�5˜CÐ'Ð'Ò'Ð' %Ò'Ð'Ð'Ð'Ð'؈rå'¨Ñ8Ô8Ðõ�•jÐ!1Ô2Ñ3Ô3ð؈qð �y˜�nÐ-=Ô>Ñ?Ô?Ñ ?Ð?rcó¢—|€t|¦«n|}td|¦«}d}||D] }t||¦«}|dkrdS||z }Œ!|S)a  Given a unicode string, return its printable length on a terminal. :param str pwcs: Measure width of given unicode string. :param int n: When ``n`` is None (default), return the length of the entire string, otherwise width the first ``n`` characters specified. :param str unicode_version: An explicit definition of the unicode version level to use for determination, may be ``auto`` (default), which uses the Environment Variable, ``UNICODE_VERSION`` if defined, or the latest available unicode version, otherwise. :rtype: int :returns: The width, in cells, necessary to display the first ``n`` characters of the unicode string ``pwcs``. Returns ``-1`` if a non-printable character is encountered. Nrr)r Úslicer")ÚpwcsÚnr ÚendÚidxÚwidthÚcharÚwcws rÚwcswidthr,ásk€ð&�y�#ˆd‰)Œ)ˆ) a€CÝ ��3‰-Œ-€CØ €EØ�S” ððˆÝ�d˜OÑ,Ô,ˆØ �Š7ˆ7Ø�2�2Ø �‰ ˆˆØ €Lré€cóp—ttt| d¦«¦«¦«}|S)zØ Integer-mapped value of given dotted version string. :param str ver_string: Unicode version string, of form ``n.n.n``. :rtype: tuple(int) :returns: tuple of digit tuples, ``tuple(int, [...])``. ú.)ÚtupleÚmapÚintÚsplit)Ú ver_stringÚretvals rÚ_wcversion_valuer6ÿs.€õ•3•s˜Z×-Ò-¨cÑ2Ô2Ñ4Ô4Ñ 5Ô 5€FØ €Mrécó2—t ot|t¦«}|rd„t¦«D¦«}nt¦«}|d}|dvr6tj d|sdn| ¦«¦«}|dvr|s|n| ¦«S||vr|s|n| ¦«S t|¦«}nQ#t$rDtj d  ||¬¦«¦«|s|n| ¦«cYSwxYw|d }t|¦«}||krAtj d   ||¬ ¦«¦«|s|n| ¦«St|¦«D]{\}} t||d z¦«} n*#t$r|s|n| ¦«cYcSwxYw|| d t|¦«…kr ||d zcS| |kr|cSŒ|Jd||f¦«‚)aT Return nearest matching supported Unicode version level. If an exact match is not determined, the nearest lowest version level is returned after a warning is emitted. For example, given supported levels ``4.1.0`` and ``5.0.0``, and a version string of ``4.9.9``, then ``4.1.0`` is selected and returned: >>> _wcmatch_version('4.9.9') '4.1.0' >>> _wcmatch_version('8.0') '8.0.0' >>> _wcmatch_version('1') '4.1.0' :param str given_version: given version for compare, may be ``auto`` (default), to select Unicode Version from Environment Variable, ``UNICODE_VERSION``. If the environment variable is not set, then the latest is used. :rtype: str :returns: unicode string, or non-unicode ``str`` type for python 2 when given ``version`` is also type ``str``. có6—g|]}| ¦«‘ŒS©)Úencode)Ú.0r s rú z$_wcmatch_version...s €ÐDÐDÐD¨S˜CŸJšJ™LœLÐDÐDÐDrr)rrÚUNICODE_VERSIONÚlatest)r?r?zªUNICODE_VERSION value, {given_version!r}, is invalid. Value should be in form of `integer[.]+', the latest supported unicode version {latest_version!r} has been inferred.)Ú given_versionÚlatest_versionrz‹UNICODE_VERSION value, {given_version!r}, is lower than any available unicode version. Returning lowest version level, {earliest_version!r})r@Úearliest_versionrNFzCode path unreachable)Ú_PY3Ú isinstanceÚstrrÚosÚenvironÚgetr;r6Ú ValueErrorÚwarningsÚwarnÚformatÚ enumerateÚ IndexErrorr ) r@Ú _return_strÚunicode_versionsrAÚ cmp_givenrBÚcmp_earliest_versionr(r Úcmp_next_versions rrr sÝ€õ>�(Ð=�z¨-½Ñ=Ô=€Kàð+ØDÐDµM±O´OÐDÑDÔDÐÐå(™?œ?ÐØ% bÔ)€NàÐ)Ð)Ð)Ýœ ŸšØ Ø'Ð DˆHˆH¨^×-BÒ-BÑ-DÔ-DñFôFˆ ðÐ-Ð-Ð-ð&1ÐMˆ~ˆ~°n×6KÒ6KÑ6MÔ6MÐMàÐ(Ð(Ð(ð%0ÐKˆ}ˆ}°]×5IÒ5IÑ5KÔ5KÐKð NÝ$ ]Ñ3Ô3ˆ ˆ øå ðNðNðNåŒ ð"÷#)¢&°}Ø8Fð#)ñ#Hô#Hñ Iô Ið Ið &1ÐMˆ~ˆ~°n×6KÒ6KÑ6MÔ6MÐMÐMÐMðNøøøð(¨Ô*ÐÝ+Ð,<Ñ=Ô=ÐàÐ(Ò(Ð(õ Œ ð<çô >ð >ð (3ÐQÐÐÐ8H×8OÒ8OÑ8QÔ8QÐQõ!*Ð*:Ñ ;Ô ;ð#ð#шˆ_ð RÝ/Ð0@ÀÀqÁÔ0IÑJÔJÐ Ð øÝð Rð Rð Rà)4ÐQ�>�>¸.×:OÒ:OÑ:QÔ:QÐ QÐ QÐ QÐ QÐ Qð Røøøð Ð(¨­#¨i©.¬.¨Ô9Ò 9Ð 9Ø# C¨!¡GÔ,Ð ,Ð ,Ð ,ð ˜iÒ 'Ð 'Ø"Ð "Ð "Ð "ð (àLÐ*¨MÐ;KÐLÑLÔLˆ5s%ÃCÃA D ÄD ÆF/Æ/"GÇG)r)Nr)Ú__doc__Ú __future__rrFÚsysrJÚ table_widerÚ table_zerorrPrÚ functoolsrÚ ImportErrorÚbackports.functools_lru_cacheÚ_UNICODE_CMPTABLEÚ version_inforCÚsetrrr"r,r6rr:rrúr_sÄðð=ð=ð| ÐÐÐÐÐð € € € Ø € € € Ø€€€ð'Ð&Ð&Ð&Ð&Ð&Ø"Ð"Ð"Ð"Ð"Ð"Ø+Ð+Ð+Ð+Ð+Ð+ð8à#Ð#Ð#Ð#Ð#Ð#Ð#øØð8ð8ð8ð8Ð7Ð7Ð7Ð7Ð7Ð7Ð7ð8øøøð ÐØ Ô˜Ô˜qÒ €ð�ðððñô€ ð, ð ð ð6 €�4ÐÑÔðP@ðP@ðP@ñÔðP@ðfðððð< €�3ÐÑÔð ð ñÔð ð €�1ÐÑÔðmMðmMñÔðmMðmMðmMs ¨/¯ =¼=