AlkantarClanX12

Your IP : 18.222.51.159


Current Path : /proc/thread-self/root/proc/self/root/lib64/python2.7/site-packages/pynche/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib64/python2.7/site-packages/pynche/Main.pyc

�
��^c@s,dZdZddlZddlZddlZddlZddlmZddlmZddlmZddl	m	Z	ddl
m
Z
ejd	Zd
Z
dZdd
ejjejd	d�gZd�Zdd�Zd�Zdddddd�Zd�Zd�Zedkr(e�ndS(sPynche -- The PYthon Natural Color and Hue Editor.

Contact: %(AUTHNAME)s
Email:   %(AUTHEMAIL)s
Version: %(__version__)s

Pynche is based largely on a similar color editor I wrote years ago for the
SunView window system.  That editor was called ICE: the Interactive Color
Editor.  I'd always wanted to port the editor to X but didn't feel like
hacking X and C code to do it.  Fast forward many years, to where Python +
Tkinter provides such a nice programming environment, with enough power, that
I finally buckled down and implemented it.  I changed the name because these
days, too many other systems have the acronym `ICE'.

This program currently requires Python 2.2 with Tkinter.

Usage: %(PROGRAM)s [-d file] [-i file] [-X] [-v] [-h] [initialcolor]

Where:
    --database file
    -d file
        Alternate location of a color database file

    --initfile file
    -i file
        Alternate location of the initialization file.  This file contains a
        persistent database of the current Pynche options and color.  This
        means that Pynche restores its option settings and current color when
        it restarts, using this file (unless the -X option is used).  The
        default is ~/.pynche

    --ignore
    -X
        Ignore the initialization file when starting up.  Pynche will still
        write the current option settings to this file when it quits.

    --version
    -v
        print the version number and exit

    --help
    -h
        print this message

    initialcolor
        initial color, as a color name or #RRGGBB format
s1.4.1i����N(tPyncheWidget(tSwitchboard(tStripViewer(t
ChipViewer(tTypeinViewerisBarry Warsawsbarry@python.orgs/usr/openwin/lib/rgb.txts/usr/lib/X11/rgb.txts	X/rgb.txtcCstt�S(N(t__doc__tglobals(((s1/usr/lib64/python2.7/site-packages/pynche/Main.pyt	docstringSstcCs't�GH|r|GHntj|�dS(N(Rtsystexit(tcodetmsg((s1/usr/lib64/python2.7/site-packages/pynche/Main.pytusageWscCs�|d�}||�\}}}|dkrI|d|�\}}}n|dkrvdG|GH|d�\}}}n|dkr�tdd�n|||fS(NcSsty|j|�\}}}WnHtjk
rfytj|�\}}}Wqgtjk
rbdSXnX|||fS(N(NNN(tfind_bynametColorDBtBadColortrrggbb_to_triplettNone(tstcolordbtrtgtb((s1/usr/lib64/python2.7/site-packages/pynche/Main.pyt
scan_coloras	t#s Bad initial color, using gray50:tgray50is#Cannot find an initial color to use(RR
(RRRRRR((s1/usr/lib64/python2.7/site-packages/pynche/Main.pyt
initial_color_s	cCs	t|o
|�}|dkr7|j�jd�}nd}t}|dkr_|j�}nxe|dkr�ytj|�}Wntt	fk
r�nX|dkrb|s�Pn|jd�}qbqbW|s�t
dd�n|j|�tt
|d|�}|j�}	|jt||	��|jt||	��|jt||	��|dkr�|j�}
|
jd�}|
jd�}|
jd�}
|dks�|
dks�|dkr�td	|�\}}}
q�nt||�\}}}
|j|||
�||fS(
NtDBFILEiis0No color database file found, see the -d option.tmastertREDtGREENtBLUEtgrey50(RRtoptiondbtgettRGB_TXTtpopRtget_colordbtKeyErrortIOErrorR
tset_colordbRt__version__twindowtadd_viewRRRRtupdate_views(RtinitialcolortinitfiletignoretdbfileRRtfilestapptwR"tredtgreentblue((s1/usr/lib64/python2.7/site-packages/pynche/Main.pytbuild{sD
$cCs&y|j�Wntk
r!nXdS(N(tstarttKeyboardInterrupt(R3R((s1/usr/lib64/python2.7/site-packages/pynche/Main.pytrun�s
c	Cs�y5tjtjdddddddg�\}}Wn#tjk
rZ}td|�nXt|�dkrvd}n)t|�dkr�|d}n
td�t}d}tj	j
d	�}x�|D]�\}}|dkr�td�q�|dkrdt�GHtjd�q�|dkr&|}q�|dkr;t
}q�|dkr�|}q�q�Wtd|d|d|d|�\}	}
t|	|
�|
j�dS(Nishd:i:Xvs	database=s	initfile=R0thelptversionis	~/.pynches-hs--helps-vs	--versionsxPynche -- The PYthon Natural Color and Hue Editor.
Contact: %(AUTHNAME)s
Email:   %(AUTHEMAIL)s
Version: %(__version__)ss-ds
--databases-Xs--ignores-is
--initfileR.R/R1(s-hs--help(s-vs	--version(s-ds
--database(s-Xs--ignore(s-is
--initfile(tgetoptR	targvterrorR
tlenRtFalsetostpatht
expanduserRR
tTrueR8R;t
save_views(toptstargsRR.R0R1R/topttargR3tsb((s1/usr/lib64/python2.7/site-packages/pynche/Main.pytmain�sB
"	


		

t__main__(RR*R	RCR>RRRRRRR?tPROGRAMtAUTHNAMEt	AUTHEMAILRDtjoinR$RR
RRR8R;RMt__name__(((s1/usr/lib64/python2.7/site-packages/pynche/Main.pyt<module>/s2
		3		-