%PDF- %PDF-
Mini Shell

Mini Shell

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

�

=	f����dZdZdZdZddlZddlZddlZddlZddl�ddl	m
Z
mZmZm
Z
edd	d
fdezddd
fejd
ddddddddejej ej"ej$ej&ej(dddddgZ	e
j,eeeeeef�Zej3dgd�d��\ZZZZZZdZ dZ!d Z"gZ#dZ$d!Z%eD�]�\Z&Z'e&d"vrc	e'jQd#�D�cgc] }|jS�jU���"c}Z e
jXe �r�Zej[d%g�&��ne&d'vr:e'jS�jU�Z%e%d(vrej[d)g�&���d*gZ ��e&d+vr
	e.e'�Z"��e&d-vr;	e.e'�Z!e!d.kDre0jcd/�d.Z!e!dks��ej[d2g�&���e&d3vrde'jQd#�D�cgc] }|jU�jS���"c}Z#e
jde#�r��Lej[d4g�&���ae&d5vs��ge'jS�jU�Z$���e �Mejf�Z e �ejhd�e0jkd6e dz�e0jkd�ejld7�e D�]�Z7e7d*k(r#e0jke0jqd8e!z��ddd9d:d;d<d=�Z9iZ:e#D],Z;e;e9vrejxdfe:e9e;<�ejxdfe:e;<�.e0j{e:�e
j|e7ge!e"e:e$e%�Z?e@�d>\ZAZBZCZDe?�r�e?D];ZEeFeGeE�eA�ZAeFeGe?eEd�eC�ZCeFeGe?eEd?�eD�ZD�=e7d*k(r�ej�eAd?d@�eCd?d@�eDd?d@�f�ZIe0jkeIj�dA��e0jkeIj�dBeAzdBeCzdBeDzf��e?D]1ZEe0jkeIj�eEe?eEde?eEd?f���3n�e7dCvr�ej�eAd?d@�eCd?d@�f�ZIe0jkeIj�dD��e0jkeIj�dBeAzdBeCzf��e?D]*ZEe0jkeIj�eEe?eEdf���,ne0j�dEe7z�e0jkdFeGe?�e7fz���Pe0j�dGe7z�e7d*k(r$e0j�dH�e0j�dI����e0j�dJ����	e0jkd�e0jkdL�ycc}w#e+$rd$gZ Y��ywxYw#e/$rd Z"e0jcd,�Y���wxYw#e/$rd0Z!e0jcd1�Y��wxYwcc}w#eM$re0j�dK�Y��wxYw)Mz4.1�hp-probezPrinter Discovery UtilityzFDiscover HPLIP supported USB, parallel, and network attached printers.�N)�*)�device�utils�tui�module��nameTzUsage: %s [OPTIONS]�summary)z
Bus to probe:z-b<bus> or --bus=<bus>�optionF)r	za<bus>: cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)rF)zSet Time to Live (TTL):z&-t<ttl> or --ttl=<ttl> (Default is 4).rF)zSet timeout:z4-o<timeout in secs.> or --timeout=<timeout is secs.>rF)zFilter by functionality:z)-e<filter list> or --filter=<filter list>rF)r	zq<filter list>: comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)rF)zSearch:z%-s<search re> or --search=<search re>rF)r	zC<search re> must be a valid regular expression (not case sensitive)rF)zNetwork discovery method:z>-m<method> or --method=<method>: <method> is 'slp'* or 'mdns'.rF)z Find all devices on the network:zhp-probe -bnet�exampleF)z.Find all devices on USB that support scanning:zhp-probe -busb -escanr
F)z`Find all networked devices that contain the name 'lnx' and that support photo cards or scanning:z!hp-probe -bnet -slnx -escan,pcardr
F)z4Find all devices that have queues installed in CUPS:zhp-probe -bcupsr
F)z Find all devices on the USB bus:rr
Fzb:t:o:e:s:m:)zttl=zfilter=zsearch=zfind=zmethod=z	time-out=ztimeout=zbus=F)�handle_device_printer�
��slp)z-bz--bus�,�usbzInvalid bus name)�	error_msg)z-mz--method)r�mdns�bonjourz>Invalid network search protocol name. Must be 'slp' or 'mdns'.�net)z-tz--ttlz.TTL value error. TTL set to default of 4 hops.)z-oz	--timeoutz
--time-out�-z$Timeout > 45secs. Setting to 45secs.�z5Timeout value error. Timeout set to default of 5secs.z/You must specify a positive timeout in seconds.)z-ez--filterzInvalid term in filter)z-sz--searchz--findz
Using connection type: %szDEVICE DISCOVERYzPProbing network for printers. Please wait, this will take approx. %d seconds...
z	scan-typez	copy-typez
pcard-typezfax-type)�print�none�scan�copy�pcard�fax)rrrr�)�width�margin)�
Device URI�Model�Name�-)r�par�cups)r#r$zInvalid bus: %sz&
Found %d printer(s) on the '%s' bus.
zMNo devices found on the '%s' bus. If this isn't the result you are expecting,z:check your network connections and make sure your internetzfirewall software is disabled.zFcheck to make sure your devices are properly connected and powered on.z	User exitzDone.)N�__version__�__mod__�	__title__�__doc__�sys�getopt�operator�os�base.g�baserrrr�
USAGE_OPTIONS�USAGE_LOGGING1�USAGE_LOGGING2�USAGE_LOGGING3�
USAGE_HELP�USAGE_SPACE�USAGE_EXAMPLES�USAGE�Module�INTERACTIVE_MODE�mod�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�loc�bus�timeout�ttl�filter�search�method�o�a�split�lower�strip�	TypeError�validateBusList�usage�int�
ValueError�log�note�validateFilterList�connection_table�exit�info�header�b�bold�
FILTER_MAP�filter_dict�f�gt�debug�probeDevices�devices�cleanup_spinner�max_c1�max_c2�max_c3�max_c4�d�max�len�
TextFormatter�	formatter�compose�error�warn�KeyboardInterrupt)�xs0�/usr/share/hplip/probe.py�<module>rus���0��
��'�	�
R���
��	��+�+��2�v�t�	$�
�'�
)�2�y�$�	?�	�	�	�	E�
E�	_�	b�	c�
U�	N�	e�	y�	�	�	�u�3�3�U�5I�5I�	�	�	�	�	�	�	�	�	�	Q�	f�
e�	f�	K�)	��2U�
�&�-�-���K��%�)�+�-�C�	����F�05�	�	7�:�D�*�l�D�*�c��C��G�	�C�
�F�
�F�
�F��,'���1����
�23�'�'�#�,�?�Q�q�w�w�y���(�?��*�6�)�)�#�.��	�	�%7�$8�	�9�
�$�
$��W�W�Y�_�_�&�F��7�7��	�	�%e�$f�	�g��g��
�/�
!�
K��!�f��
�3�
3�
R��a�&���R�<��H�H�C�D� �G�
��{��	�	�%V�$W�	�X�
�$�
$�12�����>�A�a�g�g�i�o�o�'�>�F�,�6�,�,�V�4��	�	�%=�$>�	�?�
�.�
.��W�W�Y�_�_�&�F�Y,'�\�{�"�c�"�"�$���;��C�H�H�Q�K����.��Q��7�8�������C�J�J�!�"�
�Gc����:��H�H�S�X�X�q�t{�{�|�}� $�#�)�)�+�'��
����	2�A��J��.6�k�k�1�-=��J�q�M�*�"*�+�+�q�!1��A��		2�	�	�	�+��%�&�%�%�q�c�7�C��f�f�U����)3�&�������
9���S��V�V�,���S����A��/��8���S����A��/��8��
9�
�E�z�/�E�/�/�*0�Q� ?�*0�Q� ?�*0�Q� ?���	�����*�*�+J�K�L�����*�*�C��J��F�
�C��J�+O�P�Q� �S�A��H�H�Y�.�.��7�1�:�a�=�'�!�*�Q�-�/P�Q�R�S��,�,�/�E�/�/�*0�Q� ?�*0�Q� ?���	�����*�*�+B�C�D�����*�*�C��J��F�
�+C�D�E� �D�A��H�H�Y�.�.��7�1�:�a�=�/A�B�C�D��	�	�+�a�/�0��H�H�?�3�w�<�QR�BS�S�T�
�H�H�d�gh�h�i��E�z����U�V����9�:����a�b�OGc�X�����������I@���
��g��
��"�
K������I�J�
K���
R������P�Q�
R��?��x���I�I�k���s��AW�$V
�7%V�V
�W�2AW�	V�W� V;�7W�=+W�(%W�
W�$W�?L%W�V
�
V�W�V�W�V8�4W�7V8�8W�;W�W�W�W�W8�7W8

Zerion Mini Shell 1.0