%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	fM$����dZdZdZdZddlZddlZddlZddlZddlZddl	�ddl
mZmZm
Z
mZmZmZddlmZdd	lmZd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Z	ej<eeeedee fe!fddd�
Z"e"jGejHgd���e"jK�\Z&Z'Z(Z)Z*Z+e"jYe'e(dejZe.fi��Z'e'sej^d�e0jcde'z�e)e k(r'e
jd�se0jgdez�eZ)e)ek(�r�	ejhe'e(�Z5		e5js�e5ju��rXe5jvjyde.�Z=e0j}de=z�e=e?k(re0jgd��n3e=e@k(r!ej�e5ej�ee��n
e=eCk(r ej�e5ej�ee�n�e=eEk(r ej�e5ej�ee�n�e=eGk(r ej�e5ej�ed�n�e=eIk(rej�e5ej��n{e=eKk(rej�e5ej��nXe=eMk(rej�e5ej��n5e0jgd �n#e0jgd!�ej^d�e5j��nn	dd"lQmRZRdd#lSmTZT	eRej��ZWeTde'�ZXeXj��	e0j}d%�eWj��	ej^d�e0jcd'�e0jcd(�y#e6$r;Z7e0jgde7jpz�ej^d�YdZ7[7��{dZ7[7wwxYw#e6$r'e0jgd�ej^d�Y���wxYw#e5j��wxYw#eU$r'e0jgd$�ej^d�Y��6wxYw#e[$rej^d�Y��wxYw#e[$re0jgd&�Y��wxYw))z3.0z+Printer Cartridge Color Calibration Utilityzhp-colorcalzwPerform color calibration on HPLIP supported inkjet printers. (Note: Not all printers require the use of this utility).�N)�*)�device�status�utils�maint�tui�module)�input)�cupsc�<�tjd|||fz||�S)Nz<Enter the best aligned value for line %s (%d-%d or q=quit): �r�enter_range)�letter�hortvert�colors�minimum�maximums     �/usr/share/hplip/colorcal.py�enterAlignmentNumberr*s*���?�?�Y�	��'�"�#�$+�W�6�6�c�6�tjd|zd|�S)NzPEnter numbered arrow that is best aligned with the paper edge (1-%d or q=quit): �r
)rs r�enterPaperEdger.s#���?�?�m����G��rc�:�tjd||fzd|�S)NzgEnter the numbered box on line %s that is best color matched to the background color (1-%d or q=quit): rr
)�liners  r�colorAdjr2s*���?�?�E�	
�w����G�%�%rc�0�tjddd�S)Nz`Enter the numbered image labeled "1" thru "7" that is best color matched to the image labeled "Xr�r
�rr�colorCalr 6s)���?�?�B�DE�GH�I�Irc�0�tjddd�S)NzZSelect the number between 1 and 81 of the numbered patch that best matches the background.r�Qr
rrr�	colorCal2r#9s"���?�?�{�}~�AC�D�Drc�.�tjd�y)NzNInvalid cartridge(s) installed.
Please install valid cartridges and try again.��log�errorrrr�
invalidPenr(<s���I�I�_�`rc�.�tjd�y)NzPPhoto cartridge not installed.
Please install the photo cartridge and try again.r%rrr�photoPenRequiredr*?s���I�I�a�brc�.�tjd�y)NzxPhoto cartridge or photo blue cartridge not installed.
Please install the photo (or photo blue) cartridge and try again.r%rrr�photoPenRequired2r,Bs���I�I�J�Krc�0�tjd�gd�}d}	ttjd��}|j	�j�dk(rd}�n|j	�j�dk(rd\|d	<|d
<n�t
|�dkrtjd���t
|�d
kDrtjd���|d	j	�}|dvrtjd���	t|d
d�}|d	ks|dkDrtjd���tt|�j��td�z
|d	<|d
z
|d
<	|�r[	ttjd��}|j	�j�dk(rd}	||fS|j	�j�dk(rd\|d<|d
<	||fSt
|�dkrtjd���t
|�d
kDrtjd���|d	j	�}|dvrtjd���	t|d
d�}|d	ks|dkDrtjd���tt|�j��td�z
|d<|d
z
|d
<	||fS||fS#t$rtjd�Y���wxYw#t$rtjd�Y���wxYw)Na?Instructions:
1. Hold the calibration page at arm's length in front of your eyes.
2. Tilt the page away from you. Look at the two large squares, each containing colored patches. For each large square, find the colored path that most closely matches the background color. Each patch has an associated letter and number.
)rrrrTzdEnter the letter ('A' thru 'N') and number (1 thru 14) for the GRAY plot (eg, "C5") or "q" to quit: �qF�d)���r0rr�z>You must enter at least two characters (a letter and a number)�zDEnter only a single letter and a one or two digit number (eg, "C5").�abcdefghijklmnz$You must enter a letter 'A' thru 'N'zDYou must enter a letter 'A' thru 'N' followed by a number 1 thru 14.��AzdEnter the letter ('P' thru 'V') and number (1 thru 7) for the COLOR plot (eg, "R3") or "q" to quit: zDEnter only a single letter and a one or two digit number (eg, "R3").�pqrstuvz$You must enter a letter 'P' thru 'V'zCYou must enter a letter 'P' thru 'V' followed by a number 1 thru 7.r�P)
r&�infor
�bold�lower�strip�lenr'�int�
ValueError�ord�str�upper)�values�ok�xr�numbers     r�	colorCal4rFFs����H�H����F�	
�B�
��#�(�(�F�G�
H���7�7�9�?�?���#��B���7�7�9�?�?���#�#)� �F�1�I�v�a�y���q�6�A�:��I�I�V�W���q�6�A�:��I�I�\�]���1�������)�)��I�I�<�=��	���1�2��Z�F�
�A�:��"���I�I�\�]����F��)�)�+�,�s�3�x�7��q�	��Q�J��q�	�
�	���c�h�h� J�K�L�A��w�w�y��� �C�'����D�v�:��A�w�w�y��� �C�'�'-�$��q�	�6�!�9��<�v�:��9�1�v��z��	�	�Z�[���1�v��z��	�	�`�a���q�T�Z�Z�\�F��Y�&��	�	�@�A��
��Q�q�r�U���
��z�V�a�Z��	�	�_�`���C��K�-�-�/�0�3�s�8�;�F�1�I���
�F�1�I��
�v�:��2�v�:���i�	��I�I�\�]��	��P�
��	�	�_�`��
�s$�K�K3�K0�/K0�3L�LFT)zhp-alignzhp-cleanzhp-linefeedcalz	hp-pqdiag)�
see_also_listzcolor-cal-type)�filterrzUsing device : %s
z@%s -u/--gui requires Qt4 GUI support. Entering interactive mode.zUnable to open device: %sz>Unable to print to printer. Please check device and try again.zColor calibration type=%dz�Color calibration through HPLIP not supported for this printer. Please use the printer's front panel to perform color calibration.zInvalid color calibration type.zGDevice is busy or in an error state. Please check device and try again.)�QApplication)�ColorCalDialogz,Unable to load Qt4 support. Is it installed?zStarting GUI loop...z	User exit�zDone.)\�__version__�	__title__�__mod__�__doc__�sys�re�getopt�operator�os�base.g�baserrrrrr	�base.sixext.movesr
�prntrrrrr r#r(r*r,rF�Module�INTERACTIVE_MODE�GUI_MODE�UI_TOOLKIT_QT4�mod�setUsage�USAGE_FLAG_DEVICE_ARGS�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�lang�getDeviceUri�ne�COLOR_CAL_TYPE_NONE�exitr&r8�canEnterGUIMode4r'�Devicer/�Error�e�msg�open�isIdleAndNoError�mq�get�color_cal_type�debug�COLOR_CAL_TYPE_UNSUPPORTED�COLOR_CAL_TYPE_DESKJET_450�
colorCalType1�load_paper_prompt�COLOR_CAL_TYPE_MALIBU_CRICK�
colorCalType2�(COLOR_CAL_TYPE_STRINGRAY_LONGBOW_TORNADO�
colorCalType3�COLOR_CAL_TYPE_CONNERY�
colorCalType4�COLOR_CAL_TYPE_COUSTEAU�
colorCalType5�COLOR_CAL_TYPE_CARRIER�
colorCalType6�COLOR_CAL_TYPE_TYPHOON�
colorCalType7�load_photo_paper_prompt�close�PyQt4.QtGuirI�ui4.colorcaldialogrJ�ImportError�argv�app�dlg�show�exec_�KeyboardInterruptrrr�<module>r�sf��.��9�	�
��D���	�
��	��:�:�#��6��%�I�D�a�c�K�U�pa�
�&�-�-���K��$�)�8�4�~�6G��PU�W[�]�C��L�L��.�.� -��.�
	����;�D�*�l�D�*�d��!�!�*�l� �8�;�;�0C�"D�E�"�G�J���������H�H�
"�Z�
/�0��x��%�u�%�%�'��I�I�X�[b�b�c�#�D����	���
�
�j�,�7�A�
*	�
�����
�!�!�#�!"�����*:�<O�!P���	�	�5��F�G�!�%?�?��I�I�c�d�#�'A�A�'�E�'�'��3�+@�+@�(�L\�]�#�'B�B�'�E�'�'��3�+@�+@�)�Z�X�#�'O�O�'�E�'�'��3�+@�+@�(�L]�^�#�'=�=�'�E�'�'��3�+@�+@�)�T�R�#�'>�>�'�E�'�'��3�+@�+@�A�#�'=�=�'�E�'�'��3�+@�+@�A�#�'=�=�'�E�'�'��3�+F�+F�G��I�I�?�@��	�	�c�d�������
�G�G�I�	�0�9�
��s�x�x�(�C� ��z�2�C��H�H�J�
��	�	�0�1��	�	��

��C�H�H�Q�K�
�����������W�	��I�I�1�A�E�E�9�:��C�H�H�Q�K�K��	���
��	�	�Z�[�������
��N
�G�G�I���	��I�I�D�E��C�H�H�Q�K�	��%�
�������
�����I�I�k���s��CQ�+M>�O�FO0�Q�.P�:,Q�'!P4�Q�>N>�0N9�3Q�9N>�>Q�(O-�)O0�,O-�-O0�0P�Q�(P1�-Q�0P1�1Q�4Q�Q�Q�Q�Q,�+Q,

Zerion Mini Shell 1.0