%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	fw6���dZdZdZdZddlZddlZddlZddlZddl	Z	ddlZddl
Z
ddl�ddl�ddl
mZmZmZmZmZddlmZdd	lmZ	dd
lmZdZd�Z d
�Z!dod�Z"edddfdezdddfejFejHejJddejLejNdejPejRejTejVejXejZddgZ.ej^eeeee.e0e1fe2e3e4fd�Z5e5jmdgd�d��\Z7Z8Z9Z:Z;Z<dZ=e>Z?e@ZAdZBe7D]�\ZCZDeCdvrNej�j�ej�j�ej�j�eD���Z=�XeCdk(reIZ?e;dk(s�eej�d ��weCd!k(reKZ?e;dk(s��ej�d"���eCd#k(r	eLeD�ZA��eCd$k(s��dZB��ej��rej�d%�e0Z:eBsde5_Ne5j��ePj�ZRd&eRzZSe5j��ZUeUdur#ej�d'�ej�d(�e=��ej�j�e=�sej�d)e=z�e"d(�ej�j�e=�rVej�j�e=d&eRz�Z=ej�j�e=�sej�d)e=z�e"d(�ej�j�e=�eSk7rej�d*eSz�e"d(�ej�e=�d+dd,cZ]Z^Z_d-e=zZ=ej9d.e=e]fz�e:e1k(r`e;dk(r.ej��sJej�d/ez�e"d(�n-ej��sej�d0ez�e"d(�ej�ecj�d1d2��Zeeer	ddlf�	eg�ZhdZindZidd5lmmnZnenj��ZpdZqepj��enj�k(re=�dZqe:e1k(�r�e;dk(�r�	ddlt�dd6lumvZvewej��Zyezj�eye|d8�eye}d9��e<�Qe~j�d:d;d<�Z<e<j��d<k(r+e�e��j��Z<ej9d=e<z�e<j��d>k7r�d?Z	e<�jd@�\Z�Z�d@j�e�eg�Z<ej9dAe<z�e�d�Z�dBe�zZ�ej9dCe�z�e��je�eP�j�Z�e�rey�je��nd>Z<e<d>k(rej9dD�nbej9dEe<z�e��je�e<��e<eP_�	e��j!e��j"e��j%e<��ev�j(�Z�ey�j-e��e��j/�ey�j1��n�e�j2e;�\ZwZ�ee�dFz�Zue;dGk(rddHl�m�Z�ne;dIk(rddHl�m�Z�ewej��ZyeqrHe��j<ddJdKeRze��j>e��j@z�e��j>k7re"d(�eu�jCde?eA�Z�e��j/�	ej9dL�ey�jG��n�	e�jKdN�e�jKd�e�jLdOeRz�eqr7e�jKdPeRz�e�jNdQ�\Z�Z�e�re�se"d�e=��Ce�jTdRdS�T�Z�e��jYdU�e��jYdV�e��jYdW�e��j[�e�j\dXgdY�dZ�\Z�Z�e�re�d[k(re"d�e�dZk(rdZ=�n�	ee�j_d\eRz���ja�Z=e=�ja�j��d[k(re"d(�e=�jcd]�rej�d^e=z��|ej�j�ej�j�ej�j�e=���Z=ej�j�e=�sej�d)e=z���ej�j�e=�rMej�j�e=eS�Z=ej�j�e=�sej�d)e=z���aej�j�e=�eSk7rej�d*eSz����ej�e=�d+dd,cZ]Z^Z_d-e=zZ=	e=�jcd-�re�jLd_�nRe�jLd`�e�jKda�e�jd�ZUeUsej�db�e"d(�e�jKdce=z�e�jfdd�Zep�jie=e �\Z�Z=Z�e��e�e�k7rgej�e��e�e�e�fvr6e�jNdedf�\Z�Z�e�re�s5ep�jwe=�e"d�nep�jwe=�e"d(�e�jLdg�ep�jye=e:�ep�jwe=�e�jzdhg�Z�dZ�e�D]�Z�e�j�e��Z�e�j�did�s�)e�se�jLdj�dZ�e�jKe�j_dke�z��	e�j�e��Z�eĐj��re�jKdm�eĐj����	e�jKd�e�jKdn�e"d�y#e$r"Zej9e�ddlmZYdZ[��dZ[wwxYw#ejj�$rZlej�d3�dZiYdZl[l���dZl[lwwxYw#ej�d4�dZiY���xYw#e$rej�d7�e"d(�Y��swxYw#e�$re<Z�d@j�e<eg�Z<Y���wxYw#e��j&$rY��wxYw#e�$rej�dM�e"d�Y�� wxYw#e�$rej�dl�e"d(�Y��|wxYw#e�$rej�dM�Y��bwxYw)pz2.1z	hp-pluginz#Plugin Download and Install Utilityz2HP Proprietary Plugin Download and Install Utility�N)�*)�device�utils�tui�module�services)�input)�cups)�
import_module)�dyn_import_modc��tjtd|z|z|z�tj||z��y)N�d)�pm�update�intr�format_bytes)�c�s�ts   �/usr/share/hplip/plugin.py�plugin_download_callbackr6s2���I�I�c�#�a�%��'�!�)�n�
�
�
��!��
$�&�c��t|�y�N)�print)rs r�plugin_install_callbackr;s	��	�!�Hrc�V�tj�tj|�yr)�mod�unlockInstance�sys�exit)�codes r�
clean_exitr#>s�������H�H�T�Nr��nameTzUsage: %s [MODE] [OPTIONS]�summary)z'Installation for required printer mode:z--required (Qt4 only)�optionF)z'Installation for optional printer mode:z--optional (Qt4 only)r'F)z$Specify the path to the plugin file:z--p <path> or --path=<path> or --plugin=<path>r'F)zhp-setupr$�seealsoF)zhp-firmwarer$r(Fzsp:)zpath=zplugin=zplug-in=zreason=�generic�optional�requiredF)�handle_device_printer)z-pz--pathz--pluginz	--plug-inz
--required�qt3z--required switch ignored.z
--optionalz--optional switch ignored.z--reasonz-sz8It is not recommended to run 'hp-plugin' in a root mode.zhplip-%s-plugin.runzBPlug-in lock acquire failed. check if hp-plugin is already running�zPlug-in path '%s' not found.zPlug-in filename must be '%s'.�gzfile://zPlugin path=%s (%d)zR%s requires GUI support (try running with --qt4). Try using interactive (-i) mode.zR%s requires GUI support (try running with --qt3). Try using interactive (-i) mode.�	configurez
policy-kitzBPolicyKit support requires DBUS or PolicyKit support files missingz)Unable to load pkit...is HPLIP installed?)�
pluginhandler)�pluginform2z,Unable to load Qt3 support. Is it installed?zlastWindowClosed()zquit()�ui�loc�systemzUsing system locale: %sr�utf8�.z&Trying to load .qm file for %s locale.zhplip_%s.qmzName of .qm file: %szUsing default 'C' localezUsing locale: %sz
.plugindialog�qt5)�QMessageBox�qt4� zsThe driver plugin for HPLIP %s appears to already be installed. Do you wish to download and re-install the plug-in?zStarting GUI loop...z	User exitz](Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)z!PLUG-IN INSTALLATION FOR HPLIP %sz?The driver plugin for HPLIP %s appears to already be installed.z3Do you wish to download and re-install the plug-in?)�Option�Description)�
�2)�header�
min_widths)�dz&Download plug-in from HP (recommended))�pz(Specify a path to the plug-in (advanced))�qz"Quit hp-plugin (skip installation)z6
Enter option (d=download*, p=specify path, q=quit) ? )rBrCrDrBrDz<Enter the path to the 'hplip-%s-plugin.run' file (q=quit) : zhttp://z(Plug-in filename =%s must be local file.zCOPY PLUGINzDOWNLOAD PLUGINz"Checking for network connection...z Network connection not detected.zDownloading plug-in from: %szDownloading plug-in:z)Do you still want to install the plug-in?�nzINSTALLING PLUG-IN�hpzfw-downloadzDOWNLOADING FIRMWAREz%
Downloading firmware to device %s...zError opening device. Exiting.zFirmware download successful.
zDone.)r)��__version__�__mod__�	__title__�__doc__r �getopt�time�os.path�os�re�gzip�base.g�base.strings�baserrrrr�base.sixext.movesr	�prntr
�	importlibr�ImportError�e�log�debug�
base.utilsrrrrr#�
USAGE_MODE�USAGE_GUI_MODE�USAGE_INTERACTIVE_MODE�USAGE_LANGUAGE�
USAGE_OPTIONS�USAGE_LOGGING1�USAGE_LOGGING2�USAGE_LOGGING3�
USAGE_HELP�USAGE_SPACE�
USAGE_SEEALSO�USAGE�Module�INTERACTIVE_MODE�GUI_MODE�UI_TOOLKIT_QT3�UI_TOOLKIT_QT4�UI_TOOLKIT_QT5r�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkitr4�plugin_path�PLUGIN_NONE�install_mode�PLUGIN_REASON_NONE�
plugin_reason�
Is_quiet_mode�o�a�path�normpath�abspath�
expanduser�PLUGIN_REQUIRED�warn�PLUGIN_OPTIONALr�running_as_root�quiet�	showTitle�prop�installed_version�version�plugin_filename�lockInstance�ok�errorr!�exists�isdir�join�basename�stat�size�checksum�	timestamp�canEnterGUIMode�canEnterGUIMode4�to_bool�sys_conf�get�PKIT�	base.pkit�	PolicyKit�pkit�pkit_installed�dbus�
DBusException�ex�	installerr1�PluginHandle�	pluginObj�plugin_installed�	getStatus�PLUGIN_INSTALLED�qtr3r2�QApplication�argv�app�QObject�connect�SIGNAL�SLOT�	user_conf�lower�str�
QTextCodec�locale�split�l�x�
ValueError�QTranslator�trans�qm_file�load�localization_dir�loaded�installTranslator�QLocale�
setDefault�	setlocale�LC_ALL�	normalize�Error�PluginForm2�w�
setMainWidget�show�	exec_loop�
import_dialog�
ui_package�PyQt5.QtWidgetsr9�PyQt4.QtGui�question�Yes�No�PluginDialog�dialog�exec_�KeyboardInterrupt�infor@�enter_yes_no�cont�ans�	Formatter�table�add�output�enter_choice�bold�strip�
startswith�check_network_connection�
ProgressMeter�download�status�	error_strr�
ERROR_SUCCESS�ERROR_UNABLE_TO_RECV_KEYS�ERROR_DIGITAL_SIGN_NOT_FOUND�deleteInstallationFiles�
run_plugin�getSupportedCUPSDevices�cups_devices�title�dev�queryModelByURI�mq�DevicerB�downloadFirmware�close�rr�<module>r�s���.��
��1�	�
>���
���	�	����5�5�#��;�'�
��&�

���B���
%�'�'�1�2�y�$�
G�
�
�
�
�
�
�
�
&�
&�
_�
_�
�
�
�
�
�
�
t�
�
�
�� 4� 4�e�6J�6J�
�
�
�
�
�
�
�
�
�
,�
/�!	
��(�f�m�m�G�Y��W�e�%�x�0�#�^�^�D�d�L��
���U�?�+0��2�6��j�,��j�#�
����"�
��
���D�A�q��5�5��g�g�&�&�r�w�w���r�w�w�7I�7I�!�7L�'M�N��	
�l�	�&������H�H�1�2�	
�l�	�&������H�H�1�2�	
�j���A��
�	
�d���
�%�(�8�����H�H�
G�H��D���C�I��M�M�O�
�
 �
 ��'�'�1���������;��I�I�R�S��C�H�H�Q�K���
�7�7�>�>�+�&��	�	�0�;�>�?��1�
�	�w�w�}�}�[�!��g�g�l�l�;�0E��0O�P���w�w�~�~�k�*��I�I�4�{�B�C��q�M�	�w�w����$��7��	�	�2�_�D�E��1�
�!(����� 4�Q� 7��S��D�(�I��k�)�K��I�I�#�{�D�&9�9�:��8���U��$�u�$�$�&��I�I�j�mt�t�u��q�M�%�u�%�%�'��I�I�j�mt�t�u��q�M��u�}�}�X�\�\�+�|�<�=���
��	#��;�D�!�N���N�#�&�M�&�&�(�	�������M�:�:�:�{�?R����8���U��	��&�
�3�8�8�$������V�$8�9�3��X��O��;��-�-��e�X�6�C��y�y�{�h�&��*�+�+�-�.���	�	�3�c�9�:��9�9�;�#���A�
)��y�y��~���1��h�h��1�v�&��

�I�I�>��D�E���%�E�#�a�'�G��I�I�,�w�6�7��Z�Z���)>�)>�?�F���%�%�e�,����#�:��I�I�0�1��I�I�(�3�.�/����w�s�|�,��D�K�
�� � �����0@�0@��0E�F�
$�K�#�#�%�����!��	�����
�
��$7�5�#6�#6�z�#B� ��j�
�:��7�
8�����3�
�5�
 �/��3�8�8�$���#�{�#�#�D�!$�"W�X_�"_�"-�/�/�K�N�N�"B�D�HS���W��1�
�����|�]�C�����
�	��I�I�,�-��I�I�K�I����p�q��������
�
�6��@�A���H�H�V�Y`�`�a�(��(�(�)^�_�I�D�#��s��1�
���!�C�M�M�)B�x�X�E��I�I�E�F��I�I�G�H��I�I�A�B��L�L�N�(��(�(�)b���%�I�D�#��3�#�:��1�
��c�z� ���"'����1o��2 �)!�#"�"'�%�'� �#�(�(�*�0�0�2�c�9�"�1�
�#�.�.�y�9��	�	�"L�{�"Z�[� �')�g�g�&6�&6�r�w�w���r�w�w�GY�GY�Ze�Gf�7g�&h��!�w�w�~�~�k�:��I�I�&D�{�&R�S�$��7�7�=�=��5�*,�'�'�,�,�{�O�*T�K�#%�7�7�>�>�+�#>� #�	�	�*H�;�*V� W� (��7�7�+�+�K�8�O�K��I�I�&F��&X�Y�$�4;�B�G�G�K�4H��4K�R�QT�1��h�	�&/�+�&=����!�!�)�,��C�J�J�}�%��C�J�J�(�)��H�H�9�:�/��/�/�1�B���	�	�<�=��1�
����/�+�=�>�
�S�
�
�5�
6��)2�);�);�K�Ia�)b�&���Y�
���]�"��I�I�i� ��3�5Q�R�R�,�C�,�,�-X�Z]�^�	��c��3��5�5�k�B��q�M��1�1�+�>��1�
�	��
�
�'�(����[�$�/��)�)�+�6�5�v�5�5�t�f�=�����	�C�'��'�'��,�B��v�v�m�Q�'���C�J�J�5�6� �E�������"J�S�"P�Q�R�"�%��
�
�c�*�A�
�%�%�'��H�H�>�?����	�)	�4����������
�1�
��k�;��I�I�a�L�:�:��;��B�!�!�	#��I�I�Z�[�"�N��	#����	�	�=�>�����	��I�I�D�E��q�M�	��$�
)����h�h��Q�x�(��
)��0�<�<�
��
��H!�	��I�I�k�"��q�M�	��H�"��I�I�>�?��q�M�"�����	�	�+���s��
q�r �	q0�r;�(s �!.t�"t�6Qu"�<u"�t=�"6u"�q-�q(�(q-�0r�?r�r �r�r � r8�;s�s� s>�=s>�t�t�t:�9t:�=u�u"�u�u"�"u<�;u<

Zerion Mini Shell 1.0