%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/hplip/__pycache__/
Upload File :
Create Path :
Current File : //usr/share/hplip/__pycache__/levels.cpython-312.pyc

�

=	fi�	�|	�dZdZdZdZddlZddlZddlZddlZddlZddl	�ddl
mZmZm
Z
mZmZddlmZd	ej$�d
zdzZedd
fd�Zej-d�	ej.eeeedef�Zej5ej6ddezddfddg��ej9dgd��\ZZZZ Z!Z"ejGee�ZesejHd
�ejKdez�eZ&dZ'd
Z(eD]T\Z)Z*e)dvr9	e+e*jY��Z&e&d
kse&ekDs�,ej_dez�eZ&�Ce)dvrdZ'�Je)dvs�O	e*dZ(�V	ejbee�Z2		e2jk�e2jm�e2jrde:k7r�ejKd �gZ;d
Z*		e+e2jxd!e*z�Z=e+e2jxd"e*z�Z>e2jxd#e*zZ?ej�d$e*e=e>e?fz�e;j�e*e>e=e?f�e*d
z
Z*�vejid,�ejHd
�e2j��	ejKd �ejKd.�y#e-e.f$rej_dez�eZ&Y���wxYw#e0$rd
Z(Y���wxYw#e3$r'ejid�ejHd
�Y��twxYw#e3$r;Z7ejide7jpz�ejHd
�YdZ7[7���dZ7[7wwxYw#e0$rYnwxYwe;j�e
j�e
j���%�e;D�]"ZEeE\Z*Z>Z=Z?e2jxd&e*zZFe2jxd'e*zZGe2jxd(e*zZHe2jxd)e*zZIeFeJeKfvrqe>eLeMeNeOePeQeRfvrfejKej�eH��ejKd*e?z�ejKd+eIz�eeGe=e&e'e(�ejKd ���ejKej�eH��ejKd*e?z�ejKd+eIz�ejKd ���%��9#e2j��wxYw#eU$rejid-�Y��VwxYw)/z2.0zSupply Levels Utilityz	hp-levelszIDisplay bar graphs of current supply levels for supported HPLIP printers.�N)�*)�device�status�utils�tui�module)�cups���
T�/c	�F�d|z}|dk(rd}t||z�}t|�}||dz
kDr|dz
}|�r"|ttttfvr't
j
t
jd�n�|ttfvr't
j
t
jd�n�|ttfvr't
j
t
jd�ny|tk(r't
j
t
jd�nI|ttfvr't
j
t
jd�n|tt t"fvr	d	}|r!|ttfvrt
jd}t
j
d
|z|z�d	}|r!|ttfvrt
jd}t
j
dd||zd
||z
dz
zd||fz�d	}|rt
jd}t
j
d
t|�z|z�y)NgY@g��teal�fuscia�yellow�blue�bold��-z%s%s%s%s (approx. %d%%)%s�|� �reset)�int�AGENT_TYPE_CMY�AGENT_TYPE_KCM�AGENT_TYPE_CYAN�AGENT_TYPE_CYAN_LOW�log�info�codes�AGENT_TYPE_MAGENTA�AGENT_TYPE_MAGENTA_LOW�AGENT_TYPE_YELLOW�AGENT_TYPE_YELLOW_LOW�AGENT_TYPE_BLUE�AGENT_TYPE_BLACK�AGENT_TYPE_BLACK_B8800�
AGENT_TYPE_LG�AGENT_TYPE_G�
AGENT_TYPE_PG)�agent_level�
agent_type�size�
use_colors�bar_char�adj�bar�colors        �/usr/share/hplip/levels.py�logBarGraphr5+s�����*�C�
�C�x�U��

�k�#�o�
�C��t�9�D�
�d�1�f�~�T�!�V�s���.�.�/�K^�_�_��H�H�S�Y�Y�v�&�'�
�.�0F�G�
G��H�H�S�Y�Y�x�(�)�
�-�/D�E�
E��H�H�S�Y�Y�x�(�)�
�?�
*��H�H�S�Y�Y�v�&�'�
�,�.D�E�
E��H�H�S�Y�Y�v�&�'�
�M�<��G�
G���E���.�.�9�9��I�I�h�'�E��H�H�c�4�j�%�
� ��E���.�.�9�9��I�I�h�'�E��H�H�
(�C��#��
�4��*�Q�,�
��k�5�,:�:�;�
�E���	�	�'�"���H�H�c�#�d�)�m�U�
"�#�zBar graph size:z.-s<size> or --size=<size> (current default=%d)�optionF)zUse colored bar graphs:z$-c or --color (default is colorized)r7F)zBar graph character:z*-a<char> or --char=<char> (default is '/')r7F)�
extra_optionszs:ca:)zsize=r3zchar=zUsing device : %s
)z-sz--sizez/Invalid size specified. Using the default of %d)z-cz--color)z-az--charzError opening device. Exiting.z#Error opening device (%s). Exiting.zstatus-typerzagent%d-typezagent%d-kindzagent%d-skuz.%d: agent_type %d agent_kind %d agent_sku '%s')�keyzagent%d-healthz
agent%d-levelzagent%d-desczagent%d-health-desczPart No.: %sz
Health: %sz)Status not supported for selected device.z	User exitzDone.)V�__version__�	__title__�__mod__�__doc__�sys�getopt�time�operator�os�base.g�baserrrrr�prntr	�ttysize�DEFAULT_BAR_GRAPH_SIZEr5r�
set_module�Module�INTERACTIVE_MODE�mod�setUsage�USAGE_FLAG_DEVICE_ARGS�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�lang�getDeviceUri�exitr r.r3r0�o�ar�strip�	TypeError�
ValueError�warn�KeyError�Device�d�Error�error�open�queryDevice�e�msg�mq�STATUS_TYPE_NONE�sorted_supplies�dqr-�
agent_kind�	agent_sku�debug�append�sort�
cmp_to_key�	levelsCmp�x�agent_healthr,�
agent_desc�agent_health_desc�AGENT_HEALTH_OK�AGENT_HEALTH_UNKNOWN�AGENT_KIND_SUPPLY�AGENT_KIND_HEAD_AND_SUPPLY�AGENT_KIND_TONER_CARTRIDGE�AGENT_KIND_MAINT_KIT�AGENT_KIND_ADF_KIT�AGENT_KIND_INT_BATTERY�AGENT_KIND_DRUM_KITr�close�KeyboardInterrupt�r6r4�<module>r�s(��.��#�	�
��
U���
���	��3�3���K�C�K�K�M�!�,�-�b�0��/E�QU�`c�+$�^���{��p�
�&�-�-���K��$�)�+�-�C��L�L��.�.�	�L�Oe�e�go�qv�w�\�_�a��b�	����"=�>�;�D�*�l�D�*�d��!�!�*�l�;�J���������H�H�
"�Z�
/�0�!�D��E��H�����1�� � �
.��1�7�7�9�~��
�a�x�4�"8�8����J�Mc�c�d�-��
�#�
#��E�
�"�
"�
��Q�4��#�,��F�M�M�*�l�3��
;�	�
�F�F�H�
�M�M�O�

�4�4�
��"2�2��H�H�R�L� �O��A��S�!$�Q�T�T�.�1�*<�%=�!>�J�!$�Q�T�T�.�1�*<�%=�!>�J� !���]�Q�%6� 7�I��I�I�N�RS�U_�ak�mv�Qw�w�x�$�*�*�A�z�:�y�+Q�R��Q����V
�I�I�A�B��C�H�H�Q�K�	���	�
�����������s�z�*�
.����J�Mc�c�d�-��
.���
���
�����	�	�2�3����������	��I�I�;�a�e�e�C�D��C�H�H�Q�K�K��	�� �����

� � �%5�U�%5�%5�e�o�o�%F� �G�$�
!��78�4��:�z�9� �t�t�$4�q�$8�9���d�d�?�Q�#6�7���T�T�.�1�"4�5�
�$%�D�D�)>��)B�$C�!��O�5I�#J�J��#4�$>�$>�$8�$6�$:�$7�
#:�:��H�H�S�X�X�j�1�2��H�H�^�i�7�8��H�H�\�,=�=�>���Z��u�h�O��H�H�R�L��H�H�S�X�X�j�1�2��H�H�^�i�7�8��H�H�\�,=�=�>��H�H�R�L�5
!��B	
���	�����I�I�k���s��)B&R!�J�&
R!�1"R!�J+�R!�J9�2 K(�(R�;AL+�>R�R!�J(�$R!�'J(�(R!�+J6�2R!�5J6�6R!�9(K%�!R!�$K%�%R!�(L(�-0L#�R�#L(�(R�+L3�0R�2L3�3ER�R�R!�!R;�:R;

Zerion Mini Shell 1.0