Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
utils
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: display.cpython-310.pyc
o O�h^} � @ s< d dl mZ zd dlZW n ey daY nw dad dlmZ d dlZd dl Z d dlZd dlZd dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZmZ d dlm Z! d dl"m#Z#m$Z$m%Z%m&Z& d d l'm(Z(m)Z) d d l*m+Z+ d dl,m-Z- d dl.m/Z0 d d l1m2Z2 d dl3m4Z4 ej5r�d dl6m7Z7 e�8d�Z9e j:�;e j<�=d��Z>e j?fe>j@_Ae jBe jCfe>jD_Ade �Ee jC�d d d ZFdaGdaHdDdd�ZIG dd� dejJ�ZKG dd � d ejJ�ZLdZMeNe!d!��rOe!jOZPeP�rejP�QeP��re�RePejS��se�RejP�TeP�ejS��rFejUePejVd"d#� e�Wd$�ZMejXjYD ]ZZeZ�[eKeNe!d%g ��� eZ�[eL� � �q0n e\d&eP ej]d'� e!j^ej_e!j`ejae!jbejVe!jcejae!jdej_e!jeejfe!jgejVe!jhejae!jiejVi Zjd(ZkdEd-d.�ZlejmfdFd2d3�ZndGd6d7�ZodHd=d>�ZpdId?d@�ZqG dAdB� dBe2dC�ZrdS )J� )�annotationsNFT��wraps)�unpack�pack)� constants)�AnsibleError�AnsibleAssertionError�AnsiblePromptInterrupt�AnsiblePromptNoninteractive)�to_bytes�to_text)� text_type)�stringc)�context)� Singleton)�wrap_var)� FinalQueue�P�c� � � � s [K�text�str�return�intc C s� t | t�s tdt| � ��zt�| t�}W n tjy! d}Y nw |dkr(|S d}d}| D ]1}|d7 }|dv rA|d8 }|d8 }q.zt� |�}W n tjyT d}Y nw |dkr[d}||7 }q.|dkrl|rlt d| ��|dkrr|S dS )a3 Function that utilizes ``wcswidth`` or ``wcwidth`` to determine the number of columns used to display a text string. We try first with ``wcswidth``, and fallback to iterating each character and using wcwidth individually, falling back to a value of 0 for non-printable wide characters. z$get_text_width requires text, not %s���r r )��� �z3get_text_width could not calculate text width of %r)� isinstancer � TypeError�type�_LIBC�wcswidth�_MAX_INT�ctypes� ArgumentError�wcwidth�EnvironmentError)r �width�counterr �w� r0 �@/usr/local/lib/python3.10/dist-packages/ansible/utils/display.py�get_text_widthL s<