Sindbad~EG File Manager

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

o

�/�a��@sjdZdZdZdZddlZddlZddlZddlZddlTddl	m
Z
mZmZm
Z
edd	d
fdeddd
fejd
ddddddddejejejejejejdddddgZ�zFe
�eeeeeef�Zejdgd�dd�\ZZZZZZdZ dZ!d Z"gZ#dZ$d!Z%eD]�\Z&Z'e&d"vr�zd#d$�e'�(d%�D�Z Wne)y�d&gZ Ynwe
�*e �s�ej+d'gd(�q}e&d)vr�e'�,��-�Z%e%d*vr�ej+d+gd(�q}d,gZ q}e&d-vr�ze.e'�Z"Wq}e/y�d Z"e0�1d.�Yq}we&d/v�rze.e'�Z!e!d0kr�e0�1d1�d0Z!Wne/�yd2Z!e0�1d3�Ynwe!dk�rej+d4gd(�q}e&d5v�r2d6d$�e'�(d%�D�Z#e
�2e#��s1ej+d7gd(�q}e&d8v�r=e'�,��-�Z$q}e du�r_e�3�Z e du�rQe�4d�e0�5d9e d�e0�5d�e�6d:�e D�]0Z7e7d,k�rxe0�5e0�8d;e!��ddd<d=d>d?d@�Z9iZ:e#D]Z;e;e9v�r�ej<dfe:e9e;<�q�ej<dfe:e;<�q�e0�=e:�e
�>e7ge!e"e:e$e%�Z?e@�dA\ZAZBZCZDe?�rye?D] ZEeFeGeE�eA�ZAeFeGe?eEd�eC�ZCeFeGe?eEdB�eD�ZD�q�e7d,k�r(e�HeAdBdC�eCdBdC�eDdBdC�f�ZIe0�5eI�JdD��e0�5eI�JdEeAdEeCdEeDf��e?D]ZEe0�5eI�JeEe?eEde?eEdBf���qnDe7dFv�ree�HeAdBdC�eCdBdC�f�ZIe0�5eI�JdG��e0�5eI�JdEeAdEeCf��e?D]ZEe0�5eI�JeEe?eEdf���qRne0�KdHe7�e0�5dIeGe?�e7f��qfe0�LdJe7�e7d,k�r�e0�LdK�e0�LdL��qfe0�LdM��qfWneM�y�e0�KdN�Ynwe0�5d�e0�5dO�dS)Pz4.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)rza<bus>: cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)rF)zSet Time to Live (TTL):z&-t<ttl> or --ttl=<ttl> (Default is 4).rF)zSet timeout:z4-o<timeout in secs.> or --timeout=<timeout is secs.>rF)zFilter by functionality:z)-e<filter list> or --filter=<filter list>rF)rzq<filter list>: comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)rF)zSearch:z%-s<search re> or --search=<search re>rF)rzC<search re> must be a valid regular expression (not case sensitive)rF)zNetwork discovery method:z>-m<method> or --method=<method>: <method> is 'slp'* or 'mdns'.rF)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--buscC�g|]}|�����qS�)�lower�strip��.0�xrr�/usr/share/hplip/probe.py�
<listcomp>V�r�,�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--filtercCrr)rrrrrrrzrzInvalid 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�	TypeError�validateBusList�usagerr�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�KeyboardInterruptrrrr�<module>s<
����
�
��

��
�
�
�






�


��"*�
�� �

�I�


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