%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	f�L��p�ddl�ddlmZddlmZddlZddlZ	ddlZdZ	ejdej�Z
dZdZdZd	Zd
ZdZdZd
ZeZdZgd�Zgd�Zej5�idd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d�id&d�d'd�d(d)�d*d)�d+d)�d,d�d-d�d.d�d/d�d0d�d1d2�d3d2�d4d5�d6d7�d8d�d9d�d:d5��id;d�d<d�d=d�d>d)�d?d)�d@d�dAd�dBd�dCd�dDd�dEd�dFd�dGd�dHd�dId�dJd�dKd��idLd�dMd�dNd�dOd�dPd�dQdR�dSd�dTd�dUd�dVd�dWd�dXd�dYd�dZd�d[d�d\d��ZdZdZdZd	Zide�d]e�d^e�d_e�d`e�de�de�de�d)e�d2e�dae�d5e�dbe�d7e�dce�dde�dee�dRei�Z gdf�Z!e!j5�dgdhdidjdk�Z"dl�Z#dm�Z$Gdn�do�Z%y#e
$rdZ	dZY���wxYw)p�)�*)�utils)�
to_unicode�NTFz(\d+)������)7zPCL3-Class3AzPCL3-Class3BzPCL3-Class3z
PCLM-COLORz	PCLM-MONOzPCL4-Class1z	LJ-Class1z	LJ-Class2z	LJ-Class3z	LJ-Class4z
LJ-Class4Az	LJ-Class5z	LJ-Class6�DJGenericVIP�DJ9xxVIP�DJ55xx�Stabler�
StingrayOJ�
Copperhead�
CopperheadXLP�Copperhead12�
CopperheadIPH�CopperheadIPH15�CopperheadIPH17�CLE�CLE17�PyramidRefresh17�Saipan�	Saipan15B�Kapan�ViperPlusVIP�
ViperMinusVIP�Corbett�Ampere�Python�Python10�Python11�Mimas�Mimas15�Mimas17�MimasTDR�PyramidRefresh15�P15_CISS�Pyramid�	Pyramid15�PyramidPlus�Gemstone�SPDOfficejetProAsize�SPDOfficejetProBsize�OJ7000�	OJProKx50�PSP100�PSP470�Peaks_mod-mech�Athena-L)K�	Undefined�Unsupported�
Postscript�PDFr
�LJMono�LJColor�LJFastRaster�
LJJetReady�DJ350�DJ540�DJ600�DJ6xx�
DJ6xxPhoto�DJ630�DJ8xx�DJ8x5�DJ850�DJ890�DJ9xxr�DJ3600�DJ3320�DJ4100�AP2xxx�AP21xx�AP2560r3r4�	LJZjsMono�
LJZjsColor�LJm1005�QuickConnectrr2�LJP1XXXrrr�
ViperPlusTrim�ViperMinusTrimr r"r1r+r,r#r%r&rrrrrrrr)rr!r$rr-�Hbpl1rr(rr.r/rr0rr'r*r5r6r9�psr:�pdfr
�pcl3r;r<r=�pclxlr>r?r@rArBrCrDrErFrGrHrIrrJ�lidilrKrLrMrNrOr3r4rP�zjsrQrR�zxsrS�jpegrr2rTrrrrUrVr r"r1r#r%r&rr,rrrrrrr)rr!rW�hbpl1rr(rr.r/rr0rr'r*�pcl5�pcl6�pcl5e�pcl�zjstream�zxstream�jpg�jetready�jr) �LargeFormatSuperB�
LargeFormatA3�
CoverMedia�	FullBleed�Duplex�Normal�
Apollo2000�
Apollo2200�
Apollo2500�NoPhotoMode�NoPhotoBestHiresModes�No1200dpiNoSensor�NoFullBleed�4x6FullBleed�
300dpiOnly�
GrayscaleOnly�
NoAutoTray�NoEvenDuplex�NoAutoDuplex�NoCDDVD�NoMaxDPIr~�SmallMargins�Trim�4800x1200dpi�Advanced�Mono�Color�Mono_Duplex�
AutoDuplex�K10�CuHdIPH�LaserJet�PSC�HP�MFP)�laserjet�psc�hp�mfpc��|j�j�}d|vr|jdd�}n9|jd�r|ddjdd�}n|jdd�}g}|j	�D]\}t
j
|�r|j|��*|jtj||j����^d|vrdj|�Sddj|�zS)N�apollo�_� r�rzHP )�lower�strip�replace�
startswith�split�pat_prod_num�search�append�MODEL_UI_REPLACEMENTS�get�
capitalize�join)�model�ml�z�y�xs     �/usr/share/hplip/base/models.py�normalizeModelUINamer�!s���	����	�	�	�B��2�~��J�J�s�C� ��
�=�=����1�2����s�C�(�A��
�
�3��$�A�
�A�
�W�W�Y�C�����q�!�
�H�H�Q�K�
�H�H�*�.�.�q�!�,�,�.�A�B�	C��2�~��x�x��{���s�x�x��{�"�"�c	�Z�t|t�s	|jd�}tj|jdd�jdd�jdd�jd	d�d�S#t$r(tjd|�dt
|��d��Y��wxYw)
Nzutf-8zFailed to encode model = z  type=r�r��__�~��/)
�
isinstance�str�encode�UnicodeEncodeError�log�error�typer�xstripr�)r�s r��normalizeModelNamer�9s����e�S�!�Q��<�<��(�5��<�<��
�
�c�3�/�7�7��c�B�J�J�3�r�R�Z�Z�[^�`c�d�fi�j�j��!�Q�

�)�)�U�4��;�O�
P�Q�s�A9�9.B*�)B*c�D�eZdZd
d�Zdd�Zdd�Zd�Zd�Zd�Zd�Z	d
d	�Z
y)
�	ModelDataNc�
�|�tj|_n||_i|_|j	�tjd�|_tjdt
j�|_	tjd�|_
tjd�|_tjd�|_tjj|jd�tjj|jdd�ftjjtj �d	d
d�tjjtj �d	d
dd�fg}|D]:\|_|_tjj'|j"�s�:n%d\|_|_t(j+d�id
t,�dt,�dt,�dt,�dt,�dt,�dt.�dt0�dt,�dt,�dt2�dt,�dt,�dt,�dt,�dt,�dt,�idt2�dt,�d t,�d!t,�d"t,�d#t,�d$t,�d%t,�d&t,�d't4�d(t.�d)t,�d*t0�d+t6�d,t6�d-t6�d.t,��t4t4t,t0t0d/��|_id0t0�d1t0�d2t0�d3t.�d4t0�d5t0�d6t0�d7t0�d8t,�d9t,�d:t,�d;t0�d<t0�d=t0�d>t0�d?t,�d@t0�t0t,t0t0t0t,t,t,t,t,t.t.dA��|_itjdBt
j<�t,�tjdCt
j<�t,�tjdDt
j<�t0�tjdEt
j<�t0�tjdFt
j<�t.�tjdGt
j<�t,�tjdHt
j<�t,�tjdIt
j<�t,�tjdJt
j<�t,�tjdKt
j<�t.�tjdLt
j<�t0�tjdMt
j<�t,�tjdNt
j<�t.�tjdOt
j<�t,�tjdPt
j<�t.�tjdQt
j<�t0�tjdRt
j<�t.�tjdSt
j<�t.tjdTt
j<�t0i�|_i|_ y)UNz	^\[(.*)\]z^\%include (.*)z	^\%(.*)\%z
^([^=]+)=(.*)z^(\d{1,2})/(\d{1,2})/(\d{4,4})z
models.dat�
unreleasedzunreleased.dat�data�models)NNz Unable to locate models.dat filez
align-typez
clean-typezcolor-cal-typez	copy-typezembedded-server-typezfax-typezfw-download�iconzio-mfp-modezio-modez
io-supportzjob-storagezmonitor-typezlinefeed-cal-typezpanel-check-typez
pcard-type�pluginz
plugin-reasonzpower-settingszpq-diag-typezr-typez	scan-typezscan-srczstatus-battery-checkzstatus-dynamic-counterszstatus-typezsupport-subtypezsupport-releasedzsupport-typezsupport-verz
tech-classzfamily-classz
tech-subclassz	tech-type)zusb-pidzusb-vidzwifi-configzppd-namez
family-ppdzdev-filezfax-urizscan-urizis-hp�hostzstatus-descz
cups-printers�serialzerror-statezdevice-state�panelz
device-urizpanel-line1zpanel-line2zback-end�port�deviceid)zcups-urizstatus-code�rs�rr�rg�r�duplexerzsupply-door�revisionz
media-pathztop-doorz
photo-trayz^r(\d+)-agent(\d+)-kindz^r(\d+)-agent(\d+)-typez^r(\d+)-agent(\d+)-skuz^agent(\d+)-descz^agent(\d+)-virginz^agent(\d+)-dvcz^agent(\d+)-kindz^agent(\d+)-typez^agent(\d+)-idz^agent(\d+)-hp-inkz^agent(\d+)-health-descz^agent(\d+)-health$z^agent(\d+)-knownz^agent(\d+)-levelz^agent(\d+)-ackz^agent(\d+)-skuz
^in-tray(\d+)z^out-tray(\d+)z^model(\d+))!�prop�
models_dir�	root_path�_ModelData__cache�reset_includes�re�compile�sec�I�inc�inc_line�eq�date�os�pathr��getcwd�released_dat�unreleased_dat�existsr�r��TYPE_INT�	TYPE_BOOL�TYPE_STR�
TYPE_BITFIELD�TYPE_HEX�	TYPE_LIST�FIELD_TYPES�FIELD_TYPES_DYN�
IGNORECASE�RE_FIELD_TYPES�
TYPE_CACHE)�selfr��filess   r��__init__zModelData.__init__Ds7����!�_�_�D�N�&�D�N���������:�:�l�+����:�:�0�"�$�$�7����
�
�<�0��
��*�*�-�.����J�J�@�A��	��'�'�,�,�t�~�~�|�<��'�'�,�,�t�~�~�|�=M�N�P��'�'�,�,�r�y�y�{�F�H�l�K��'�'�,�,�r�y�y�{�F�H�l�L\�]�_�`��
7<�	:�2�D��t�2��w�w�~�~�d�/�/�0��	:�
6@�2�D��t�2��I�I�8�9�*��8�*�
�8�*�
�x�	*�

�(�*�
#�X�
*�
��*�
�I�*�
�X�*�
�H�*�
��*�
�=�*�
�H�*�
�X�*�
 �(�*� 
��!*�"
�8�#*�$
�x�%*�&
�m�'*�(
�h�)*�*
�X�+*�,
�x�-*�.
�(�/*�0
��1*�4
#�X�5*�6
&��7*�8
�H�9*�:
��;*�<
��=*�>
�X�?*�@
�H�A*�B
�9�C*�D
�Y�E*�F
�i�G*�H
�(�I*�J!� �#�!�#�S*���X ��� �
�� �
��	 �

�i� �
�X�
 �
�H� �
�h� �
�x� �
�H� �
�X� �
�h� �
�8� �
�H� �
�H� � 
��! �"
�X�# �$
��% �&"�$�����!�$�!�#�"�$�= ���B��J�J�1�2�=�=�A�H���J�J�1�2�=�=�A�H��
�J�J�0�"�-�-�@�8��
�J�J�*�B�M�M�:�X�	�

�J�J�,�b�m�m�<�y��
�J�J�)�2�=�=�9�H�
�
�J�J�*�B�M�M�:�X��
�J�J�*�B�M�M�:�X��
�J�J�(�"�-�-�8�8��
�J�J�,�b�m�m�<�y��
�J�J�1�2�=�=�A�H��
�J�J�-�r�}�}�=���
�J�J�+�R�]�]�;�i��
�J�J�+�R�]�]�;�h��
�J�J�)�2�=�=�9�I�� 
�J�J�)�2�=�=�9�H�!�"
�J�J�'����7�)�#�$
�J�J�(�"�-�-�8�9��J�J�~�r�}�}�5��'���,��r�c�B�tjj|j�rk|j	|j�|j
�Dtjj|j
�r|j	|j
�|jS�N)r�r�r�r��read_sectionr�r�)r�r�s  r��read_all_fileszModelData.read_all_files�sk��
�7�7�>�>�$�+�+�,����d�/�/�0��"�"�.�2�7�7�>�>�$�BU�BU�3V��!�!�$�"5�"5�7��|�|�r�c�
�d\}}|�I|j�}|rtjd|�d|���ntjd|�d|���|r
|j}n|j}	t|�}	|j�}	|	s�n�|	d
dvr�|	d
dk(rr|r|��n�|jj|	�}
|
�Nd	}|
jd
�j�}|�||k(x}}|r"|�tjd|�d|���i||<��|	d
dk(r�|jj|	�}
|
��|
jd
�}tjd|z�|jj!t"j$j't"j$j)|�|����=|rV|j*j|	�}
|
�9|
jd
�}
tjd|
z�	|j|
|rY|j0j|	�}
|
�<|
jd
�}|
jd�}|j3||�}|||<���|j5�|S#t$r0}tjd|�d|j�d��Yd}~yd}~wwxYw#t,$rA|jD]}|j/||
d	�s�ntjd|
z�Y��wxYw)N)FFzSearching for include [z
] in file zSearching for section [zI/O Error: z (�)FTr)�#�;�[rzFound section [�%z*Found include file directive: %%include %szFound include directive %%%s%%zInclude %%%s%% not found.r)r�r��debug�_ModelData__includesr��open�IOErrorr��strerror�readliner�r��groupr��match�_ModelData__include_filesr�r�r�r��dirnamer��KeyErrorr�r��convert_data�close)r��filename�section�
is_include�found�
in_section�cache�fd�e�liner�r��inc_file�inc_sectr��key�values                 r�r�zModelData.read_section�s���(���z����m�m�o�G���	�	�W�h�W�X��	�	�W�h�W�X���O�O�E��L�L�E�	��h��B�
��;�;�=�D����A�w�*�$���A�w�#�~��'�"5��������-���$�!%�J�#(�;�;�q�>�#7�#7�#9�L��*�.:�g�.E�F��
�!�"�.��I�I��W_�&`�a�.0��l�+���A�w�#�~������t�,���$�$�{�{�1�~�H��I�I�J�X�U�V��(�(�/�/������R�W�W�_�_�X�=V�X`�0a�b��� �M�M�/�/��5�E��(�#(�;�;�q�>���	�	�"B�X�"M�N�R� �O�O�H�5�������t�,���$��+�+�a�.�C�!�K�K��N�E� �-�-�c�5�9�E�/4�E�,�'��,�A�D	���
����O�	��I�I�h��
�
�C�D���	��j (�R�'+�';�';�R��#'�#4�#4�S�(�D�#I�$)�R�
!$�	�	�*E��*P� Q��
R�s0�-I<�>J8�<	J5�&J0�0J5�8+L�$L�Lc� �g|_i|_yr�)r�r��r�s r�r�zModelData.reset_includes+s��!�����r�c�*�|j�}	|j|S#tjd|z�tjd|jz�|j|j|�r|j|cYS|j�xtjj|j�rOtjd|jz�|j|j|�r|j|cYSicYSxYw)NzCache miss: %szReading file: %s)
r�r�r�r�r�r�r�r�r�r�)r�r�s  r��__getitem__zModelData.__getitem__0s������
��	��<�<��&�&��	��I�I�&��.�/��I�I�(�4�+<�+<�<�=�� � ��!2�!2�E�:��|�|�E�*�*��"�"�.�2�7�7�>�>�$�BU�BU�3V��	�	�,�t�/B�/B�B�C��$�$�T�%8�%8�%�@��<�<��.�.��I�s�!�A'D�
BD�Dc��|jSr�)r�rs r��
all_modelszModelData.all_modelsFs���|�|�r�c��	|j|S#t$r�	|j|cYS#t$r}	|j|cYcYS#t$rZt	|j
j
��D]1\}}|j|�}|��||j|<|ccYcYcYSYnwxYwYnwxYwYnwxYwtjd|z�y)Nz4get_data_type(): Field type lookup failed for key %s)
r�r�r�r��listr��itemsr�r�r�)r�r
�pat�typr�s     r��
get_data_typezModelData.get_data_typeJs���
	'��#�#�C�(�(���	'�

'��+�+�C�0�0���
'�'��?�?�3�/�/���'�$(��)<�)<�)B�)B�)D�$E�'���S� #�	�	�#��� �,�36�D�O�O�C�0�#&�J�J�	'�'��'�	
'��'�	'��	�	�	�H�3�N�O�sq��	B8�,�B8�	B2�A	�B2�B8�	AB,�B,�"B2�$B8�(B,�)B2�+B,�,B2�/B8�1B2�2B8�7B8c�(�|�|j|�}|ttfvr	t|�}|S|tk(rtj|�}|S|tk(r#|jd�D�cgc]}|s�|��	}}|S|tk(r�tr�|jj!|�}|�et|j#d��}t|j#d��}t|j#d��}t%j|||�}|S|t&k(r	t|d�}|S|S#tt
f$r!tjd|�d|���d}Y|SwxYwcc}w#tt
f$r!tjd	|�d|���d}Y|SwxYw)
NzInvalid value in .dat file: �=r�,rrr�z Invalid hex value in .dat file: )rr�r��int�
ValueError�	TypeErrorr�r�r�r�to_boolr�r��	TYPE_DATE�datetime_availr�r�r��datetimer�)	r�r
rrr�r��month�day�years	         r�rzModelData.convert_data^s����;��$�$�S�)�C��M�8�,�,�
��E�
��<��3�I�
��M�M�%�(�E�0��-�I�
� %���C� 0�6�1�A�Q�6�E�6�*��'�I�
���	�	�(�(��/���$�����A��/�E��e�k�k�!�n�-�C��u�{�{�1�~�.�D�$�M�M�$��s�;�E����H�_�
��E�2���
��u���;�	�*�
��	�	��e�L�M���6��;
��7��"�	�*�
��	�	�S�%�P�Q�����	
�s/�D)�,E�4E�E!�),E�E�!,F�Fr�)T)NF)�__name__�
__module__�__qualname__r�r�r�r�rrrr�r�r�r�r�Cs.��~�B�Y�x�
�,��($r�r�)&�gr�r�sixextr�os.pathr�r�r%r$�ImportErrorr�r�r��TYPE_UNKNOWN�TYPE_STRINGr�r�r�r�r�r��TYPE_URIr#�FAMILY_CLASSES�TECH_CLASSES�sort�TECH_CLASS_PDLS�PDL_TYPE_PCL�PDL_TYPE_PS�PDL_TYPE_PDF�
PDL_TYPE_HOST�	PDL_TYPES�TECH_SUBCLASSESr�r�r�r�r,r�r��<module>r>s���,����	����N��r�z�z�,����-��������
�	�
�	������
���
�	�W��Q��f
����I��T�I��%�I��V�	I�
�V�
I��V�I��W�I��W�I��V�I��V�I��V�I��V�I��V�I� �V�!I�$�V�%I�&�V�'I�(�V�)I�*�V�+I�,�V�-I�.�V�/I�0
�W�1I�2
�W�3I�4
�W�5I�6
�V�7I�8
�V�9I�:
�V�;I�<
�V�=I�>
�V�?I�@�U�AI�B�U�CI�D�U�EI�F�V�GI�H
�V�II�J�V�KI�L�U�MI�N�V�OI�P�V�QI�R�V�SI�T�g�UI�V�g�WI�X�f�YI�Z
�f�[I�\
�f�]I�^�f�_I�`�6�aI�b�V�cI�d�V�eI�f�F�gI�h�V�iI�j��kI�l�v�mI�n��oI�p�&�qI�r�&�sI�t��uI�v��wI�x
�f�yI�z�g�{I�|�f�}I�~�f�I�@�f�AI�B�f�CI�D�V�EI�F��GI�H�V�II�J�V�KI�L�V�MI�N�V�OI��V�������
�
�
�\�
�
�\�
��\�
��l�	
�

�L�
��l�

�	�;�
���
��m�
�
�M�
���
�
�M�
���
��]�
�
�M�
� ��!
�"	�=�#
�$�m�%
�	�,!��F����)3�).�)-�).���#�0k����G	���N��H��s�F(�(	F5�4F5

Zerion Mini Shell 1.0