%PDF- %PDF-
Direktori : /usr/share/hplip/__pycache__/ |
Current File : //usr/share/hplip/__pycache__/query.cpython-312.pyc |
� = f� � �F � d dl mZ dZdZdZdZd dlZd dl� d dlm Z m Z mZ ej eeeede fd � � Zej d g d�dg� � ej! dg d�d�� \ ZZZZZZdZdZdZdZdZdZdZeD ]; \ ZZedv reZ� edv reZ�edv reZdZ�edv rd ZdZ�&edv reZ�-edv reZ�4edk( s�:d Z�= eresereser%er#ejA d� ejB d� es'es%es#ejA d� ejB d� er e jD e� \ Z#Z$Z%ZZ&Z'Z(Z)Z*n"er e jX e� j[ � Zes#ejA d� ejB d� ej[ � Z.e.dv rd Zn@e.d!k( rd"Zn8e.d#k( rd$Zn0e.d%k( rd&Zn(e.d'k( r#ejA d(� ejB d� e j^ e� Z0e0s&ejA d)ez � ejB d� d*Z1erV e2e0jg � � Z4e4jk � e4D ]* Z6e1se6�d'e0e6 ��Z1�ejo e1e6�d'e0e6 ��g� Z1�, n6er e0e e�d'e0e ��Z1n#ejA d,� ejB d� er e9e1d-�.� y e9e1� y# e+$ r* ejA dez � ejB d� Y ���w xY w# e8$ r) ejA d+ez � ejB d� Y �uw xY w# e:$ r Y yw xY w)/� )�print_functionz0.2zModel Query Utilityzhp-queryz_Query a printer model for static model information. Designed to be called from other processes.N)�*)�device�models�moduleT)�quiet))zSpecify model by device URI:z'-d<device_uri> or --device=<device_uri>�optionF)zSpecify normalized model name:zE-m<model_name> or --model=<model_name> (normalized models.dat format)r F)zSpecify raw model name:zR-r<model_name> or --raw=<model_name> (raw model name from MDL: field of device ID)r F)zSpecify key to query:z<-k<key> or --key=<key> (or, use -a/--all to return all keys)r F)zQuery all keys:z'-a or --all (default separator is a LF)r F)z5Specify the separator when multiple keys are queried:zk-s<sep> --sep=<sep> (character or 'tab', 'newline', 'cr', 'lf', 'crlf')(only valid when used with -a/--all)r F)zSuppress trailing linefeed:�-xr Fzhp-info)� extra_options� see_also_listzm:k:as:d:r:x)zmodel=zkey=zsep=�allzdevice=zraw=F)�handle_device_printer�lf)z-m�--model)z-dr )z-kz--key)z-az--all)z-rz--raw)z-sz--sepr z1error: You may only specify one of -d, -m, or -r.� z-error: You must specify one of -d, -m, or -r.zerror: Invalid device URI: %szerror: Invalid model name.)r �newline� �cr� �crlfz �tab� �=z!error: Separator must not be '='.z!error: Model name '%s' not found.� zerror: Key '%s' not found.z:error: Must specify key with -k/--key or specify -a/--all.� )�end);� __future__r �__version__� __title__�__mod__�__doc__�sys�base.g�baser r r �Module�NON_INTERACTIVE_MODE�mod�setUsage�parseStdOpts�opts� device_uri�printer_name�mode� ui_toolkit�lang� norm_model� raw_model�key�all_keys�sep�suppress_trailing_linefeed�o�a�log�stderr�exit�parseDeviceURI�back_end�is_hp�bus�serial�dev_file�host�zc�port�Error�normalizeModelName�lower�s�queryModelByModel�data�output�list�keys�kk�sort�k�join�KeyError�print�KeyboardInterrupt� � �/usr/share/hplip/query.py�<module>rW s� ��, &���!� � �� k�� � � '� '�~ � �&�-�-���K��$�-�/��>�C� �L�L��A� !�k� � #� ����)]�#� � %� ;�D�*�l�D�*�d� �J��I��J� �C��H� �C�!&��� .���1��!�!��J� �#� #��J� �/� !��C��H� �/� !��H��C� �/� !��I� �/� !��C� �$�Y�)-�&�-.�0 �z��y��y�� � �F�G��������j��� � �B�C�������� �%��%�%�j�1� O�H�e�S�*�f�h��b�$� �.�V�.�.�y�9�?�?�A� ��� � �/�0�������� � ��A������ �d���� �f���� �e���� �c��� � �6�7�������#�6�#�#�J�/�D��� � �6��C�D������� �F�� �$�)�)�+� �� ��� �� D�A��$%�t�A�w�/�����6�a��a��+A�"B�C�� D� � 0���I� !$�T�#�Y�/�F� � � �O�P�������!� �f�#�� �f� ��q � ��J�J�6��C�D��C�H�H�Q�K� ��V � ��J�J�3�c�9�:��C�H�H�Q�K� �� � �� �sh �BL �;AL �J5 �6D5L �,K'