Sindbad~EG File Manager

Current Path : /usr/share/hplip/__pycache__/
Upload File :
Current File : //usr/share/hplip/__pycache__/align.cpython-310.pyc

o

�/�a�$�
@sdZdZdZdZddlZddlZddlZddlZddlZddl	Tddl
mZmZm
Z
mZmZmZddlmZzdd	lmZWney[Zze�e�dd
lmZWYdZ[ndZ[wwdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Z dd�Z!dd�Z"dd�Z#�z�e�$eeeede%e&fe'e(f�Z)e)j*ej+gd�d�e)�,�\Z-Z.Z/Z0Z1Z2e)j3e.e/dej4e5fid �Z.e.s�e�6d!�e�7d"e.�e0e&kr�e
�8�s�e�9d#e�e%Z0e0e%k�r%ze�:e.e/�Z;Wne<y�Zze�9d$ej=�e�6d�WYdZ[ndZ[ww�z ze;�>�Wne<�ye�9d%�e�6d!�Ynwe;�?��re;j@�Ade5�ZBe�d&eB�e;�C�eBeDk�r=e�9d'�n�eBeEk�rJe�Fe;ejG�n�eBeHk�rYe�Ie;ejGejJ�n�eBeKk�rhe�Le;ejGee�n�eBeMeNfv�rze�Oe;ejGeeeP�n�eBeQk�r�e�Re;e!e#ejG�n�eBeSk�r�e�Te;ejGe�n�eBeUeVeWfv�r�e�Xe;eBejGeeee�nneBeYk�r�e�Ze;ejGe"�n`eBe[k�r�e�\e;ejGe"e �nQeBe]k�r�e�^e;ejG�nDeBe_k�r�e�`e;ejGe"e �n5eBeak�r�e�be;ejGe#�n'eBeck�re�de;ejGe�neBeek�re�fe;ejGe#�ne�9d(�ne�9d%�We;�C�nCe;�C�we
�ge1�\ZhZieeid)�Zj	ehejk�Zlej�mde.�Znen�o�ze�d*�el�p�Wneq�y\e�6d�Ynw	e�6d�Wneq�yse�9d+�Ynwe�7d,�e�7d-�dS).z5.0z#Printer Cartridge Alignment Utilityzhp-alignzzCartridge alignment utility for HPLIP supported inkjet printers. (Note: Not all printers require the use of this utility).�N)�*)�device�status�utils�maint�tui�module)�cups)�
import_module)�dyn_import_modcCs0t�d||fd|�\}}|st�d�||fS)NzRFrom the printed Alignment page, Enter the best aligned value for line %s (1-%d): �r�r�enter_range�sys�exit)�letter�hortvert�colors�
line_count�maximum�ok�value�r�/usr/share/hplip/align.py�enterAlignmentNumber/���
rcCs,t�d|d|�\}}|st�d�||fS)NzFEnter numbered arrow that is best aligned with the paper edge (1-%d): rrr
)rrrrrr�enterPaperEdge:s��
rcCs0t�d||fd|�\}}|st�d�||fS)Nz]Enter the numbered box on line %s that is best color matched to the background color (1-%d): rrr
)�linerrrrrr�colorAdjErrcC�t�d�dS)NzhCannot perform alignment with 0 or 1 cartridges installed.
Please install both cartridges and try again.��log�errorrrrr�bothPensRequiredP�r#cCr)NzNInvalid cartridge(s) installed.
Please install valid cartridges and try again.r rrrr�
invalidPenTr$r%cCr)Nz�Invalid cartridge(s) installed. Cannot align with only the photo cartridge installed.
Please install other cartridges and try again.r rrrr�invalidPen2Xr$r&cCsXt�d�t�d�t�d�t�d�t�dgd�d�\}}|dkr(t�d	�|d
kS)NzyTo perform alignment, you will need the alignment page that is automatically
printed after you install a print cartridge.z*
p		Print the alignment page and continue.zGn		Do Not print the alignment page (you already have one) and continue.z	q		Quit.
z6Choice (p=print page*, n=do not print page, q=quit) ? )�p�n�qr'r)r�y)r!�infor�enter_choicerr)r�choicerrr�aioUI1\s




r.cCs�t�||�}g}t|���}|��|D]/}||ds"|�d�qt�d|||dfd||d�\}}|�|�|sCt�	d�q|S)NrzbEnter the numbered box on line %s where the inner lines best line up with the outer lines (1-%d): r)
r�align10and11and14Controls�list�keys�sort�appendrrrr)�pattern�
align_type�controls�values�
s_controlsrrrrrr�type10and11and14Alignjs"��

�r9cCsFt�d�t�t�d��t�d�t�d�t�d�t�d�dS)N�z-Follow these steps to complete the alignment:z@1. Place the alignment page, with the printed side facing down, z   in the scanner.z12. Press the Enter or Scan button on the printer.zX3. "Alignment Complete" will be displayed when the process is finished (on some models).)r!r+�boldrrrr�aioUI2~s



r<)zhp-cleanzhp-colorcalzhp-linefeedcalz	hp-pqdiag)�
see_also_listz
align-type)�filterrzUsing device : %s
z@%s -u/--gui requires Qt4 GUI support. Entering interactive mode.zUnable to open device: %szGDevice is busy or in an error state. Please check device and try again.zAlignment type=%dz|Alignment through HPLIP not supported for this printer. Please use the printer's front panel to perform cartridge alignment.zInvalid alignment type.z.aligndialogzStarting GUI loop...z	User exitr:zDone.)r�__version__�	__title__�__mod__�__doc__r�re�getopt�operator�os�base.g�baserrrrrr�prntr	�	importlibr
�ImportError�er!�debug�
base.utilsrrrrr#r%r&r.r9r<�Module�INTERACTIVE_MODE�GUI_MODE�UI_TOOLKIT_QT4�UI_TOOLKIT_QT5�mod�setUsage�USAGE_FLAG_DEVICE_ARGS�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�lang�getDeviceUri�ne�ALIGN_TYPE_NONErr+�canEnterGUIMode4r"�Device�d�Error�msg�open�isIdleAndNoError�mq�getr5�close�ALIGN_TYPE_UNSUPPORTED�ALIGN_TYPE_AUTO�
AlignType1PML�load_paper_prompt�ALIGN_TYPE_AIO�AlignType13�load_scanner_for_align_prompt�ALIGN_TYPE_8XX�
AlignType2�ALIGN_TYPE_9XX�ALIGN_TYPE_9XX_NO_EDGE_ALIGN�
AlignType3�update_spinner�ALIGN_TYPE_LIDIL_AIO�
AlignType6�ALIGN_TYPE_DESKJET_450�
AlignType8�ALIGN_TYPE_LIDIL_0_3_8�ALIGN_TYPE_LIDIL_0_4_3�ALIGN_TYPE_LIDIL_VIP�	AlignxBow�ALIGN_TYPE_LBOW�AlignType10�ALIGN_TYPE_LIDIL_0_5_4�AlignType11�ALIGN_TYPE_OJ_PRO�AlignType12�ALIGN_TYPE_LIDIL_DJ_D1600�AlignType14�ALIGN_TYPE_LEDM�AlignType15�ALIGN_TYPE_LEDM_MANUAL�AlignType16�ALIGN_TYPE_LEDM_FF_CC_0�AlignType17�
import_dialog�QApplication�
ui_package�ui�argv�app�AlignDialog�dlg�show�exec_�KeyboardInterruptrrrr�<module>s� 
������

��
�




��

�







�	

�
��


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists