JVc7@sd#dZdZdZdZddlZddlZddlZddlZddl Z ddlZddl Z yddl Z Wne k rnXddl TddlmZmZmZmZmZmZmZddlmZdd lmZdd lmZmZdZd Zd d Z e j!de j"Z#edde$fdedde$fej%ej&ej'ej(ej)ddde*fddde*fddde*fddde*fddde*fddde*fd d!de*fd"d#de*fej+ej,ej-ej.ej/d$dd%e*fd&d'de*fdd(de*fd)d*de*fd+d,de*fd-d.de$fej0d/d0d1e*fd2d3d1e*fd4d5d1e*fd6d7d1e*fd8d9d1e*fd:d;d1e*fd<d=d1e*fd>d?d1e*fd@dAd1e*fdBdCd1e*fdDdEd1e*fdFdGd1e*fej(ej1dHddIe*fdJddIe*fdKddIe*fdLddIe*fdMddIe*fdNddIe$fdOddIe$fej(ej2dPddQe*fdRddQe*fg4Z3ej4eeeee3e5e6fe7e8fdSe$Z9e9j:dTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcgdde*\Z;Z<Z=Z>Z?Z@dZAdZ=dZBdZCe$ZDe$ZEdZFe*ZGe$ZHdeZIe*ZJe*ZKxe;D] \ZLZMeLdfkre*ZHqeLdkreMZ=qeLdkreMZBqeLdkreMZ<qeLdkrageMjNdpD]ZOeOjPjQ^qZCejReCe*se9jSdqdrgqqeLd kr e*e*ZEZDeMjQjPZMxeMjNdpD]}ZTeTjQd!kre9jSdqdwgneTjQdukre$ZDqeTjQdvkreUjVseWjXdxqe$ZEqqWqeLdykrfyeYeMZIWqeZk rbe9jSdqdzgqXqeLd"kr{e$ZGqeLd#kre$ZJqeLdkre$ZKqqWye9j[d Z\Wne]k rdZ\nXeWj^de\e=dk re=ZAneBdk reBZAneWj^deAe>e6kreAdk rHeWj_dne?dkrej`seWjXdee deqqejaseWjXdee deqne>e6krs e?dkr yddlbTddlcmdZdWn(e k reWjXde denXeJr%eWjednefejgZheijjehekdehelde@dkremjndddZ@e@jPdkreoepjqZ@eWj^de@qne@jPdkr dZry.e@jNd\ZsZOdjtesergZ@Wn,eZk r& e@Zsdjte@ergZ@nXeWj^de@eudZvdesZweWj^dewevjxeweUjyZzezr ehj{evq dZ@ne@dkr eWj^dndeWj^de@e|j}e|e@e@eU_qy eqj~eqjeqje@Wneqjk r nXyedjeCe\eIZWn(ek rV eWjXde denXehjeejehjejq<#y*ddlmfZfmZddlmZWn.e k r ZreWjXdere denXefejgZheWj^dejge=e\eIe<eJfede\eIe<eJZejyeWj^dehjWq<#ek ro e d q<#XnyyddlmZWne k r eWjednXejejeJr ejde9jeAdddg\ZZ=Z<e=ZAeWjeWjde=e<fejeje5ddeA\ZZejekr| eWjdeAejee<e=e d q eWjXdeAefe deneGs eWjdeWjdne\r eje\eI\Z<ZZne< rD eCdkrD ejZCeCdkr e d neWjdeCd eWjdne<s eWj^deEeDfe9jdejeCZ<ne<s e d neWjeWjde<eWjde<jddZe<jddZeje<\ ZZZCZZZZZZeWj^deeje<Ze sFejndeekr`eWjXde denejndeeefkreEre*ZEnejejPZejndeZeKe*kreekrddlmZejZejZeejkreejkr"ejdn ejdejdZerdZejed kreWjXdeWjXde deqqqnejZejejddjdddZejdgZx@eejD],Zx#eeD]ZeWj^deqWqWejdgZx@eejD],Zx#eeD]ZeWj^deqPWq?WeDrejdeG reekreWj_ddjteeejdd\ZZDese d qqneDreGreZ=neZejdgZe<ekr-eee<ks9eekrdZx_e$redeZeekre<eks~eee<krede7ZPnede7ZqBWneGs-e=dkr3xte$r&eeWjdeZ=e=jPjQdkreWjde d ne= s&e=jPjQdkr/eZ=ne$ZxReejD]>Zx5eeD])Ze=ekrYeWjXde*ZPqYqYWqHWxReejD]>Zx5eeD])Ze=ekreWjXde*ZPqqWqWx7e=D]/ZeejkreWjXdee*ZqqWerPqqWq3neZ=eWjde=ejejddjdddZeWjdejeeeZe*Zedkre$ZeWjXdn{e\ZZeWjdeeWjdeeGs3eWjdejd\ZZes!e d nes3e$Zq3nere*Zejdd\ZZesje d nere*Zxe$reeWjdZejPjQdkreWjde d neZejjerejjerejdre jedjdZneedjdZye#jejdeZWnek rjdZnXereWjden eWjXdejd\ZZese d nereZqn eWjXderyPqyqyWqeWjXde deneGr*ddejddZZnxRe$r~eeWjdZejQjPdkrzeWjde d nPq-WxRe$reeWjdZejQjPdkreWjde d nPqWeWjeWjdeWjdeeWjde=eWjdeeWjdeeWjdeejjesle=eedeefZne=eeedefZejeje5dde\ZZeWj^deefeWj^ejdgeejkreWjXdee deqejeee=neKe*krejnde*ryejeZWnek rleWjXdqXejreWjdn eWjXdejneEreUjV reWjXde*ZEneEr yddlmZWq e k r e*ZEeWj_dq XneWjdeErejdeG reekreWj_ddjteeejdd\ZZEese d qqneErS"eGredZBnedZejdgZeekreeekseekrTdZx_e$rPedeZeekrCeeks1eeekrCede7ZPnede7ZqWneGseBdkrxqe$reeWjdeZBeBjPjQdkreWjde d neB seBjPjQdkreZBne$ZxReejD]>Zx5eeD])ZeBekr eWjXde*ZPq q WqWxReejD]>Zx5eeD])ZeBekraeWjXde*ZPqaqaWqPWx4eBD],Zed$kreWjXdee*ZqqWeriPqiqiWqneZBeWjdeBejeeB\ZZZes/eWjXde deneGrUddejddZZnxRe$reeWjdZejQjPdkreWjde d nPqXWxRe$reeWjdZejQjPdkreWjde d nPqWeWjeWjdeWjdeeWjdeBeWjdeeWjdeeWjdeejdejjesejeBeedee\ZZn$ejeBeeede\ZZeWj^deefeWj^ejdgeejkr1eWjXdee denejeeeBejdeGr`e*ZEnxe$reeWjdjQjPZedkreWjde d nesdZnedkZEed%krPneWjXdqcWeErS"ejede$ZyejWnek r5eWjXdqP"Xz d Ze$Zxe$rede7Zy(eoejZeejZWnAek reWjXdejde*ZedkrPqqHXe$ZPqHWer>"x e$r er eeWjdeZneeWjdZejQjPdkrG eWjde d neru e sl ejQjPdkru eZneed kr eWjXd qne$Zx1eD])ZOeOd kr eWjXd e*ZPq q Wes qnPqWxe$r!er!eeWjd eeZneeWjdZejQjPdkr]!eWjde d ner!e s!ejQjPdkr!eZnyejdWn&eefk r!ejdZnXeed kr!eWjXdq nPq Wyej eej eWnek r-"eWjXdq>"XeWjdnWdejXqS"neDr#e*Z ejdeGr"eHr"e$Z q"n(ejd\ZZ es"e d ne r#ejdZe=r"de=Z\n deZ\eed kr"de\Zn de\Zejeq#nWnek r;#eWjXdnXejeWjdeWjddS(&s9.0sPrinter/Fax Setup Utilityshp-setupsInstalls HPLIP printers and faxes in the CUPS spooler. Tries to automatically determine the correct PPD file to use. Allows the printing of a testpage. Performs basic fax parameter setup.iN(t*(tdevicetutilsttuitmodelstmoduletservicestos_utils(tcups(tinput(t to_unicodetfrom_unicode_to_strcCs3tjtd|||tj||dS(Nid(tpmtupdatetintRt format_bytes(tctstt((sU/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/setup.pytplugin_download_callback4sicCstjtj|dS(N(RtreleaseCupsInstancetsystexit(tcode((sU/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/setup.pyt clean_exit9s s\*NickName:\s*\"(.*)"ttnamesAUsage: %s [MODE] [OPTIONS] [SERIAL NO.|USB bus:device|IP|DEVNODE]tsummarysAutomatic mode:s-a or --auto (-i mode only)toptions.To specify the port on a multi-port JetDirect:s9--port= (Valid values are 1\*, 2, and 3. \*default)sNo testpage in automatic mode:s-x (-i mode only)s%To specify a CUPS printer queue name:s1-p or --printer= (-i mode only)s!To specify a CUPS fax queue name:s%-f or --fax= (-i mode only)sType of queue(s) to install:sW-t or --type=. : print*, fax\* (\*default) (-i mode only)s%To specify the device URI to install:s1-d or --device= (--qt4 mode only)s/Remove printers or faxes instead of setting-up:s-r or --rm or --removes[SERIAL NO.|USB ID|IP|DEVNODE]theadingsUSB bus:device (usb only):sx"xxx:yyy" where 'xxx' is the USB bus and 'yyy' is the USB device. (Note: The ':' and all leading zeros must be present.)s3Use the 'lsusb' command to obtain this information.sIPs (network only):s$IPv4 address "a.b.c.d" or "hostname"sDEVNODE (parallel only):s"/dev/parportX", X=0,1,2,...s#SERIAL NO. (usb and parallel only):s "serial no."sSetup using GUI mode:s $ hp-setuptexamples%Setup using GUI mode, specifying usb:s$ hp-setup -b usbs'Setup using GUI mode, specifying an IP:s$ hp-setup 192.168.0.101s$One USB printer attached, automatic:s$ hp-setup -i -asUSB, IDs specified:s$ hp-setup -i 001:002sNetwork:s$ hp-setup -i 66.35.250.209sNetwork, Jetdirect port 2:s$$ hp-setup -i --port=2 66.35.250.209s Parallel:s$ hp-setup -i /dev/parport0s%USB or parallel, using serial number:s$ hp-setup -i US12345678AsUSB, automatic:s$ hp-setup -i --auto 001:002s!Parallel, automatic, no testpage:s!$ hp-setup -i -a -x /dev/parport0sParallel, choose device:s$ hp-setup -i -b parsx1. If no serial number, USB ID, IP, or device node is specified, the USB and parallel busses will be probed for devices.tnotes-2. Using 'lsusb' to obtain USB IDs: (example)s $ lsusbs9 Bus 003 Device 011: ID 03f0:c202 Hewlett-Packards $ hp-setup --auto 003:011sn (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)s?3. Parameters -a, -f, -p, or -t are not valid in GUI (-u) mode.s hp-makeuritseealsoshp-probetrun_as_root_oksaxp:P:f:t:b:d:rqsttl=sfilter=ssearch=sfind=smethod=s time-out=stimeout=sprinter=sfax=stype=sport=tautosdevice=trmtremovethandle_device_printeris-xs-Ps-ps --printers-fs--faxs-ds--devices-bs--bust,t error_msgsInvalid bus names-ts--typetprinttfaxs Invalid type.s;Cannot enable fax setup - HPLIP not built with fax enabled.s--ports7Invalid port number. Must be between 1 and 3 inclusive.s-as--autos-rs--rms--removes-qsparam=%ssselected_device_name=%ss -p or -f option is not supportedtqt3sX%s requires GUI support (try running with --qt4). Also, try using interactive (-i) mode.sX%s requires GUI support (try running with --qt3). Also, try using interactive (-i) mode.(t setupforms,Unable to load Qt3 support. Is it installed?s+-r/--rm/--remove not supported in qt3 mode.slastWindowClosed()squit()tuitloctsystemsUsing system locale: %sRtutf8t.s&Trying to load .qm file for %s locale.s hplip_%s.qmsName of .qm file: %ssUsing default 'C' localesUsing locale: %ssEUnable to connect to HPLIP I/O. Please (re)start HPLIP and try again.(t QApplicationt QMessageBox(t SetupDialogs/Unable to load Qt4 support. Is it installed? %ssGSys.argv=%s printer_name=%s param=%s jd_port=%s device_uri=%s remove=%ssStarting GUI loop...(tpasswords Failed to import Password ObjectsREMOVING PRINT/FAX QUEUEthpthpfaxsRemoving '%s : %s' Queues'Successfully deleted %s Print/Fax queues/Failed to delete %s Print/Fax queue. Error : %ss](Note: Defaults for each question are maked with a '*'. Press to accept the default.)s Using connection type: %ss, DEVICE CHOOSER setup_fax=%s, setup_print=%stdevicess Setting up device: %s shpfax:shp:sModel=%ss support-typesUnsupported printer model.sfax-typetplugin(t pluginhandlersUPDATING PLUGINsPLUG-IN INSTALLATIONs hp-plugins hp-plugin -isFailed to install Plugin.sThe device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.tseriestSeriest_sfound print queue '%s'sfound fax queue '%s'sPRINT QUEUE SETUPs;One or more print queues already exist for this device: %s.s, s> Would you like to install another print queue for this devicetnis_%dsL Please enter a name for this print queue (m=use model name:'%s'*, q=quit) ?tqs OK, done.tmsKA print queue with that name already exists. Please enter a different name.sIA fax queue with that name already exists. Please enter a different name.saInvalid character '%s' in printer name. Please enter a name that does not contain this character.sUsing queue name: %ss!Locating PPD file... Please wait.s'Unable to find an appropriate PPD file.s Found PPD file: %ssDescription: %ssU Note: The model number may vary slightly from the actual model number on the device.s0 Does this PPD file appear to be the correct onesB Would you like to specify the path to the correct PPD file to usesH Please enter the full filesystem path to the PPD file to use (q=quit) :s.gztrisDescription for the file: %ss?No PPD 'NickName' found. This file may not be a valid PPD file.s Use this files0File not found or not an appropriate (PPD) file.s2PPD file required. Setup cannot continue. Exiting.s(%s Device (Automatically setup by HPLIP)t s8Enter a location description for this printer (q=quit) ?s@Enter additonal information or notes for this printer (q=quit) ?s Adding print queue to CUPS:sDevice URI: %ssQueue name: %ss PPD file: %ss Location: %ssInformation: %ssaddPrinter() returned (%d, %s)s'Printer queue setup failed. Error : %s s fw-downloads2Error opening device. Firmware download is Failed.sFirmware download successful. sFirmware download is Failed.s4Cannot setup fax - HPLIP not built with fax enabled.(R)s*Fax setup disabled - Python 2.3+ required.sFAX QUEUE SETUPs9One or more fax queues already exist for this device: %s.s< Would you like to install another fax queue for this devicet_faxsJ Please enter a name for this fax queue (m=use model name:'%s'*, q=quit) ?t#t/t%s]Invalid character '%s' in fax name. Please enter a name that does not contain this character.sRUnable to find HP fax PPD file! Please check you HPLIP installation and try again.s,%s Fax Device (Automatically setup by HPLIP)s Adding fax queue to CUPS:s/You do not have permission to add a fax device.s"Fax queue setup failed. Error : %ssFAX HEADER SETUPsD Would you like to perform fax header setup (y=yes*, n=no, q=quit) ?tysPlease enter 'y' or 'n't disable_dbussMUnable to communicate with the device. Please check the device and try again.sOCould not communicate with device. Device may be busy. Please wait for retry...ii sK Enter the fax phone number for this device (c=use current:'%s'*, q=quit) ?s6 Enter the fax phone number for this device (q=quit) ?i2sPPhone number length is too long (>50 characters). Please enter a shorter number.s0123456789-(+) sGInvalid characters in phone number. Please only use 0-9, -, (, +, and )sN Enter the name and/or company for this device (c=use current:'%s'*, q=quit) ?s9 Enter the name and/or company for this device (q=quit) ?sutf-8sVName/company length is too long (>50 characters). Please enter a shorter name/company.s6Could not communicate with device. Device may be busy.s Parameters sent to device.sPRINTER TEST PAGEs$ Would you like to print a test pages hp-testpages-p%ss-d%sshp-testpage -i %sspython ./testpage.py -i %ss User exitsDone.(s-Ps-ps --printer(s-fs--fax(s-ds--device(s-bs--bus(s-ts--type(sprintsfax(s-as--auto(s-rs--rms--remove(RARCRDRE(RFR=R>( t __version__t __title__t__mod__t__doc__Rtgetoptttimetos.pathtostretgziptreadlinet ImportErrortbase.gtbaseRRRRRRRtprntRtbase.sixext.movesR t base.sixextR R tNoneR RRtcompilet MULTILINEt nickname_pattTruet USAGE_MODEtUSAGE_GUI_MODEtUSAGE_INTERACTIVE_MODEt USAGE_SPACEt USAGE_OPTIONStFalsetUSAGE_LANGUAGEtUSAGE_LOGGING1tUSAGE_LOGGING2tUSAGE_LOGGING3t USAGE_HELPtUSAGE_EXAMPLESt USAGE_NOTESt USAGE_SEEALSOtUSAGEtModuletINTERACTIVE_MODEtGUI_MODEtUI_TOOLKIT_QT3tUI_TOOLKIT_QT4tmodt parseStdOptstoptst device_urit printer_nametmodet ui_toolkitR-tselected_device_nametfax_nametbust setup_printt setup_faxtmakeuriR"ttestpage_in_auto_modetjd_portR$tignore_plugin_checktotatsplittxtlowertstriptvalidateBusListtusagetaatpropt fax_buildtlogterrorRt ValueErrortargstparamt IndexErrortdebugtwarningtcanEnterGUIModetcanEnterGUIMode4tqtR,R+twarnR1targvtapptQObjecttconnecttSIGNALtSLOTt user_conftgettstrt QTextCodectlocaletetltjoint QTranslatorttranstqm_filetloadtlocalization_dirtloadedtinstallTranslatortQLocalet setDefaultt setlocaletLC_ALLt normalizetErrort SetupFormtwt setMainWidgettshowt exec_loopRt PyQt4.QtGuiR2tui4.setupdialogR3tdlgtexec_tKeyboardInterruptR4tsetPasswordCallbacktshowPasswordPrompttheadertgetPrinterNametststinfotboldtcups_operationt delPrintertstatust status_strtIPP_OKt sendEventtEVENT_CUPS_QUEUES_REMOVEDtmakeURItsane_uritfax_uritconnection_tablet getDeviceUrit probeDevicestreplacet print_uritparseDeviceURItback_endtis_hptmodeltserialtdev_filethosttzctporttqueryModelByURItmqtSUPPORT_TYPE_NONEt FAX_TYPE_NONEtFAX_TYPE_NOT_SUPPORTEDtnormalizeModelNamet norm_modelt PLUGIN_NONER8t installerR9t PluginHandlet pluginObjt getStatust plugin_ststPLUGIN_INSTALLEDtPLUGIN_VERSION_MISMATCHtwhicht hp_plugintcmdtexecutet getSystemPPDstppdstxstript default_modeltgetSupportedCUPSDevicestinstalled_print_devicestlisttkeystdtptinstalled_fax_devicestft enter_yes_notoktprinter_default_modeltgetSupportedCUPSPrinterNamestinstalled_printer_namestiRtname_okRtINVALID_PRINTER_NAME_CHARSt getPPDFile2t print_ppdt enter_ppdtdesctanst user_inputt file_pathtpathtexiststisfiletendswithtGzipFiletreadtnicknametopentsearchtgrouptAttributeErrortlocationt add_prnt_argst addPrintertEVENT_CUPS_QUEUES_ADDEDtDevicetdownloadFirmwaretcloseR)tfax_default_modeltinstalled_fax_namest getFaxPPDFiletfax_ppdt fax_ppd_typetnicktsetPasswordPromptt getFaxDevicettriest getPhoneNumtcurrent_phone_numtgetStationNametcurrent_station_nametsleept phone_numtlent station_nametencodetUnicodeEncodeErrortUnicodeDecodeErrortdecodetsetStationNamet setPhoneNumtprint_test_page(((sU/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/setup.pyts         4                  .                            "              &     $ $        *  $       *     (             *          $                $              (                              !                %      "  %