3
NZ              !   @   s  d dl mZ dZdZdZdZd dlZd dlZd dlZd dl	T d dl
mZmZmZmZ d1d
dZedddfde dddfejejejejejejejejejgZy$eje ejeeeeeeefee e!fddd	Z"y.e"j#ddddddddgdd\Z$Z%Z&Z'Z(Z)W nB ej*k
rB Z+ z"ej,e+j- e  ej.d W Y ddZ+[+X nX ej/drZej0d dZ1dZ2xe$D ]\Z3Z4e3d2kre  ne3d"kred# nle3d$kred% nXe3d&kre5ed'd( ej.d  n6e3d3kre4j6 j7 Z1ne3d+krdZ1ne3d,krhdZ2qhW ej0e1se  e2s,ej8ee e"j9ed ej:j;d-e<j= Z>ej?ej@d.e>  ej:jAe>ryejBe> W n eCk
r   Y nX ejDe> ejEejF ejGe'ZHejIeHe'e(e2 W n  eJk
r   ej,d/ Y nX e"jK  ej?d0 dS )4    )print_functionz1.1z0AutoConfig Utility to check queues configurationzhp-daignose-queuesz_Auto config utility for HPLIP supported multifunction Devices to diagnose queues configuration.N)*)utilsmodulequeuespasswordtextc             C   s4   | dkrt jtt t jt| ttt tjd d S )Nr   r   )	r   	log_title	__title____version__Zformat_textUSAGE__mod__sysexit)typ r   #/usr/share/hplip/diagnose_queues.pyusage&   s    r    nameTzUsage: %s [MODE] [OPTIONS]Zsummary)Zrun_as_root_okquietzhl:gsiuhelpz	help-restzhelp-manz	help-desczlogging=ZguiinteractiveF)Zhandle_device_printer   ZHPLIP_DEBUGdebuginfo-h--helpz--help-restrestz
--help-manZmanz--help-desc )end-l	--loggingz-gz-sz%s/hplip_queues.logzSaving output in log file: %sz	User exitzDone.)r   )r   r   )r!   r"   )LZ
__future__r   r   r
   r   __doc__r   osZgetoptZbase.gbaser   r   r   r   r   Z
USAGE_MODEZUSAGE_GUI_MODEZUSAGE_INTERACTIVE_MODEZUSAGE_SPACEZUSAGE_OPTIONSZUSAGE_LOGGING1ZUSAGE_LOGGING2ZUSAGE_LOGGING3Z
USAGE_HELPr   logZ
set_moduleZModuleZINTERACTIVE_MODEZGUI_MODEZUI_TOOLKIT_QT3ZUI_TOOLKIT_QT4ZUI_TOOLKIT_QT5modZparseStdOptsZoptsZ
device_uriZprinter_namemodeZ
ui_toolkitlocZGetoptErroreerrormsgr   getenvZ	set_levelZ	log_levelZ
quiet_modeoaprintlowerstripr	   ZlockInstancepathnormpathZpropZuser_dirZlog_filer   ZboldexistsremoveOSErrorZset_logfileZ	set_whereZLOG_TO_CONSOLE_AND_FILEZPasswordZpasswordObjZmain_functionKeyboardInterruptZunlockInstancer   r   r   r   <module>   s   
	















