[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.221.116.226: ~ $
�
f
�Qc	@sdZddlZddlZddlTddlZdefd��YZdadZ	dZ
dd3d	��YZd
efd��YZdefd
��YZ
de
fd��YZdefd��YZejd�efejd�efejd�e
fejd�efejd�efgZdd�ZiZd�Ziad�Zd5Zd�Zd�Zedkred�Zes�d GHejd!�nd"Zeje�\ZZ Z!Z"eGd#GeGe Ge!Gee"�GHej#e"�\Z$Z%d$Ge$Gd%Ge
j&e%�GHd6\Z'Z(Z)d7\Z'Z(Z)d8\Z'Z(Z)d-GeGd.GHddl*Z*e*j*�Z+ej,e'e(e)�Z,e*j*�Z-d/Ge,Gd0Ge-e+Gd1GHxiej.�D]XZ/eje/�\Z'Z(Z)ej0e'e(e)�Z%d2e/e'e(e)e	j&e%d!�fGHq�WndS(9sGColor Database.

This file contains one class, called ColorDB, and several utility functions.
The class must be instantiated by the get_colordb() function in this file,
passing it a filename to read a database out of.

The get_colordb() function will try to examine the file to figure out what the
format of the file is.  If it can't figure out the file format, or it has
trouble reading the file, None is returned.  You can pass get_colordb() an
optional filetype argument.

Supporte file types are:

    X_RGB_TXT -- X Consortium rgb.txt format files.  Three columns of numbers
                 from 0 .. 255 separated by whitespace.  Arbitrary trailing
                 columns used as the color name.

The utility functions are useful for converting between the various expected
color formats, and for calculating other color values.

i����N(t*tBadColorcBseZRS((t__name__t
__module__(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRst s, tColorDBcBsYeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	c
CsAd}|j|_i|_i|_d|_x
|D]}|jj|�}|s�tj	dI|jIdI|IJ|d7}q4n|j
|�\}}}|j|�}|j�}	|||f}
|jj
|
|gf�\}}||kr||kr|j|�n||f|j|
<|
|j|	<|d}q4WdS(NisError ins linei(tnamet_ColorDB__namet_ColorDB__byrgbt_ColorDB__bynametNonet_ColorDB__allnamest_retmatchtsyststderrt_extractrgbt_extractnametlowertgettappend(
tselftfptlinenotlinetmotredtgreentblueRtkeynametkeyt	foundnametaliases((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt__init__'s*			
"
!
cCs,g|jddd�D]}t|�^qS(NRRR(tgrouptint(RRtx((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRMscCs
|jd�S(NR(R"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRPscCs|jS(N(R(R((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytfilenameSscCs3y|j|SWntk
r.t|��nXdS(sReturn name for rgbtupleN(RtKeyErrorR(Rtrgbtuple((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt
find_byrgbVs
cCs?|j�}y|j|SWntk
r:t|��nXdS(s"Return (red, green, blue) for nameN(RR	R&R(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytfind_byname]s

cCs�d}d}x�|jj�D]�\}}|j|j�\}}	}
||}||	}||
}
|||||
|
}|dks�||kr|}|}qqW|S(s3Return the name of color nearest (red, green, blue)i����t(RtvaluesR	R(RRRRtnearesttnearest_nameRR trtgtbtrdeltatgdeltatbdeltatdistance((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR,es



cCse|js^g|_x-|jj�D]\}}|jj|�q"Wd�}|jj|�n|jS(NcSst|j�|j��S(N(tcmpR(tn1tn2((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt
nocase_cmp~s(RRR+Rtsort(RRR R8((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytunique_namesws			cCsTy |j|||f\}}Wn&tk
rHt|||f��nX|g|S(N(RR&R(RRRRRR ((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt
aliases_of�s
 
(RRR!RRR%R(R)R,R:R;(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR&s	&							t
RGBColorDBcBseZejd�ZRS(s?\s*(?P<red>\d+)\s+(?P<green>\d+)\s+(?P<blue>\d+)\s+(?P<name>.*)(RRtretcompileR(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR<�stHTML40DBcBs eZejd�Zd�ZRS(s+(?P<name>\S+)\s+(?P<hexrgb>#[0-9a-fA-F]{6})cCst|jd��S(Nthexrgb(trrggbb_to_tripletR"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR�s(RRR=R>RR(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR?�stLightlinkDBcBs eZejd�Zd�ZRS(s,(?P<name>(.+))\s+(?P<hexrgb>#[0-9a-fA-F]{6})cCs|jd�j�S(NR(R"tstrip(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR�s(RRR=R>RR(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRB�st	WebsafeDBcBs)eZejd�Zd�Zd�ZRS(s(?P<hexrgb>#[0-9a-fA-F]{6})cCst|jd��S(NR@(RAR"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR�scCs|jd�j�S(NR@(R"tupper(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR�s(RRR=R>RRR(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRD�s	tXorgtXConsortiumtHTMLt	lightlinktWebsafec	Cs�d}t|�}zx|j�}|s+dS|dkr@t}n	|g}x1|D]%\}}|j|�}|rPPqPqPWdS||�}Wd|j�X|a|S(N(R
topentreadlinet	FILETYPEStsearchtcloset
DEFAULT_DB(	tfiletfiletypetcolordbRRt	filetypesttyperetclass_R((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytget_colordb�s$		cCs�tj|�}|dkr�|ddkr:t|��n|dd!}|dd!}|dd!}t|d�t|d�t|d�f}|t|<n|S(	s9Converts a #rrggbb color to the tuple (red, green, blue).it#iiiiiN(t	_namedictRR
RR#(tcolorR'RRR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRA�s


*
cCs6tj|�}|dkr2d|}|t|<n|S(s/Converts a (red, green, blue) tuple to #rrggbb.s
#%02x%02x%02xN(t	_tripdictRR
(R'thexname((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyttriplet_to_rrggbb�s


gp@icCsttj|t�S(N(tmaptoperatort__div__t	_maxtuple(R'((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyttriplet_to_fractional_rgb�scCs6d}d}d}||d||d||dS(Ng�A`��"�?gbX9���?g�v��/�?iii((R'R.R/R0((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyttriplet_to_brightness�st__main__s/usr/openwin/lib/rgb.txts!No parseable color database founditnavyt:sname:saliases:i�i�i�i�i�i�i�sfinding nearest tos...sfound nearest colortintsecondss%20s: (%3d/%3d/%3d) == %s((gp@(gp@gp@gp@(iii�(i�i�i�(i�i�i�(1t__doc__RR=ttypesR_t	ExceptionRR
RPtSPACEt
COMMASPACERR<R?RBRDR>RMRWRYRAR[R]RaRbRcRRStexitttargetR)RRRR'R(RR tjoinR.R/R0ttimett0R,tt1R:tnR;(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt<module>sd
e		
		



Filemanager

Name Type Size Permission Actions
X Folder 0755
.ChipViewer.pyo.40009 File 5.37 KB 0644
.ColorDB.pyo.40009 File 9.46 KB 0644
.DetailsViewer.pyo.40009 File 10.32 KB 0644
.ListViewer.pyo.40009 File 7.03 KB 0644
.Main.pyo.40009 File 6.14 KB 0644
.PyncheWidget.pyo.40009 File 10.84 KB 0644
.Switchboard.pyo.40009 File 5.92 KB 0644
.TextViewer.pyo.40009 File 7.19 KB 0644
.TypeinViewer.pyo.40009 File 6.26 KB 0644
.__init__.pyo.40009 File 140 B 0644
.pyColorChooser.pyo.40009 File 4.32 KB 0644
ChipViewer.py File 4.88 KB 0644
ChipViewer.pyc File 5.37 KB 0644
ChipViewer.pyo File 5.37 KB 0644
ColorDB.py File 8.73 KB 0644
ColorDB.pyc File 9.46 KB 0644
ColorDB.pyo File 9.46 KB 0644
DetailsViewer.py File 9.88 KB 0644
DetailsViewer.pyc File 10.32 KB 0644
DetailsViewer.pyo File 10.32 KB 0644
ListViewer.py File 6.49 KB 0644
ListViewer.pyc File 7.03 KB 0644
ListViewer.pyo File 7.03 KB 0644
Main.py File 6.25 KB 0644
Main.pyc File 6.14 KB 0644
Main.pyo File 6.14 KB 0644
PyncheWidget.py File 10.25 KB 0644
PyncheWidget.pyc File 10.84 KB 0644
PyncheWidget.pyo File 10.84 KB 0644
README File 15.41 KB 0644
StripViewer.py File 15.1 KB 0644
StripViewer.pyc File 13.54 KB 0644
StripViewer.pyo File 13.4 KB 0644
Switchboard.py File 4.7 KB 0644
Switchboard.pyc File 5.92 KB 0644
Switchboard.pyo File 5.92 KB 0644
TextViewer.py File 6.71 KB 0644
TextViewer.pyc File 7.19 KB 0644
TextViewer.pyo File 7.19 KB 0644
TypeinViewer.py File 5.96 KB 0644
TypeinViewer.pyc File 6.26 KB 0644
TypeinViewer.pyo File 6.26 KB 0644
__init__.py File 47 B 0644
__init__.pyc File 140 B 0644
__init__.pyo File 140 B 0644
html40colors.txt File 245 B 0644
namedcolors.txt File 5.58 KB 0644
pyColorChooser.py File 3.68 KB 0644
pyColorChooser.pyc File 4.32 KB 0644
pyColorChooser.pyo File 4.32 KB 0644
pynche File 179 B 0755
webcolors.txt File 3.02 KB 0644
websafe.txt File 1.71 KB 0644