ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib64/python2.7/Demo/tkinter/guido/ss1.pyc

^c@sdZddlZddlZddlZddlZddlZddlmZdddf\ZZ	Z
dZdZd	Z
iee6ee	6e
e
6Zid
e6de	6de
6Zied
6e	d6e
d6Zid
e6de	6de
6ZdZdfdYZdfdYZdfdYZdefdYZdefdYZdefdYZdZdZdZdZddlZd fd!YZd"Z d#Z!e"d$kre!ndS(%sSS1 -- a spreadsheet.iN(texpattLEFTtCENTERtRIGHTcCs
|j|S(N(tljust(txtn((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCs
|j|S(N(tcenter(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCs
|j|S(N(trjust(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRstleftRtrighttwtecCs4d}x'|D]}|dk	r
||7}q
q
W|S(Ni(tNone(tseqttotalR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytsums

tSheetcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZRS(cCsOi|_tj|_|jjd}|j|_|j|_t|_dS(Nt__main__(tcellstrexectRExect
add_modulet	cellvaluetcelltmulticellvalueR(tselftm((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt__init__"s	cCs9|j||}t|dr1|j|jS|SdS(Ntrecalc(tgetcellthasattrRR(RRtyR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR*scCs||kr||}}n||kr8||}}ng}xRt||dD]=}x4t||dD]}|j|j||qlWqRW|S(Ni(trangetappendR(Rtx1ty1tx2ty2RR R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR1s!cCs|jj||fS(N(Rtget(RRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR<scCsJ|dkr|dkstt|ts3t||j||f<dS(Ni(tAssertionErrort
isinstancetBaseCellR(RRR R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytsetcell?scCs,y|j||f=Wntk
r'nXdS(N(RtKeyError(RRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt	clearcellDs
cCs1x*|j||||D]}|j|=qWdS(N(tselectcellsR(RR#R$R%R&txy((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
clearcellsJscCs|jd|tj|dS(Ni(R0tsystmaxint(RR$R&((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt	clearrowsNscCs|j|d|tjdS(Ni(R0R1R2(RR#R%((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytclearcolumnsQscCs||kr||}}n||kr8||}}ng|jD]P\}}||koe|knrB||ko|knrB||f^qBS(N(R(RR#R$R%R&RR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR.TscCsI|dkr|dkrdS||kr8||}}n||krT||}}n||dkrt||dkszti}x|jD]\}}	|j||	f}
t|
dr|
j||||||}
n||ko|knr(||	ko|knr(||7}|	|7}	n|
|||	f<qW||_dS(Nitrenumber(R(RRR5(RR#R$R%R&tdxtdytnewRR R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt	movecells\s"&!8

cCs8|dkst|jd|tjtjd|dS(Ni(R(R9R1R2(RR R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
insertrowsoscCs^||kr||}}n|j|||jd|dtjtjd||ddS(Nii(R3R9R1R2(RR$R&((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
deleterowssscCs8|dkst|j|dtjtj|ddS(Ni(R(R9R1R2(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
insertcolumnsyscCs^||kr||}}n|j|||j|ddtjtj||dddS(Nii(R0R9R1R2(RR#R%((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
deletecolumns}scCsLd}}x5|jD]*\}}t||}t||}qW||fS(Ni(Rtmax(RtmaxxtmaxyRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytgetsizes

cCs:x3|jjD]"}t|dr|jqqWdS(Ntreset(Rt
itervaluesRRB(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRBscCsJ|jx9|jjD](}t|dr|j|jqqWdS(NR(RBRRCRRR(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs|j\}}|d|d}}dg|}i}xZtd|D]I}t|tf||df<\}}	t||t|||<qJWxZtd|D]I}
t|
tf|d|
f<\}}	t|dt||d<qWx|jjD]\\}}
}|dks|
dkr4qnt	|drV|j
|jnt	|dr|j\}}	t
|tst|	tttfkstn*t|}t
|trt}	nt}	||	f|||
f<t||t|||<qWd}x9t|D]+}|r7|d7}n|d||7}qWxt|D]}
d}
xot|D]a}|j||
fpdtf\}}	t|	|||}|
r|
d7}
n|
|7}
qsW|
GH|
dkrZ|GHqZqZWdS(	NiiRtformattt+t-t|(RAR!tcolnum2nameRR>tlentstrRt	iteritemsRRRRDR)R(RRR'talign2action(RR?R@twidththeighttcolwidthtfullRttextt	alignmentR Rtseptline((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytdisplaysR
&!&!"	!
'
cCsdg}xn|jjD]]\\}}}t|drI|j}ndtj|}|jd|||fqW|jddj|S(Ns
<spreadsheet>txmls<value>%s</value>s%<cell row="%s" col="%s">
  %s
</cell>s</spreadsheet>s
(RRLRRWtcgitescapeR"tjoin(RtoutRR Rtcellxml((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRWs	"	
cCs\|j}t|d}|j||rN|jdrN|jdn|jdS(NRs
(RWtopentwritetendswithtclose(RtfilenameRRtf((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytsaves
cCs0t|d}t|j||jdS(Ntr(R]tSheetParsert	parsefileR`(RRaRb((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytloads(t__name__t
__module__RRRRR+R-R0R3R4R.R9R:R;R<R=RARBRRVRWRcRg(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR s,																			2		RecBseZdZdZdZdZdZdZdZeZ	dZ
dZd	Zd
Z
dZdZd
ZdZRS(cCs
||_dS(N(tsheet(RRj((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsAtj}|j|_|j|_|j|_|j|dS(N(	RtParserCreatetstartelementtStartElementHandlert
endelementtEndElementHandlertdatatCharacterDataHandlert	ParseFile(RRbtparser((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRfs
cCsct|d|d}|rVx*|jD]\}}t|||<q)W||ng|_dS(Ntstart_(tgetattrR
RLRKttexts(Rttagtattrstmethodtkeytvalue((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRls
cCs t|}|jj|dS(N(RKRvR"(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRpscCs9t|d|d}|r5|dj|jndS(Ntend_RE(RuR
RZRv(RRwRy((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRnscCs4t|jd|_t|jd|_dS(Ntrowtcol(tintR'R R(RRx((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
start_cellscCs1|jd|_tj|jd|_dS(NRDtalign(R'tfmtt	xml2alignRS(RRx((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytstart_valuescCs*yt||_Wnd|_nXdS(N(RR{R
(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytend_intscCs*yt||_Wnd|_nXdS(N(tlongR{R
(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytend_long
scCs*yt||_Wnd|_nXdS(N(tfloatR{R
(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
end_doublescCs*yt||_Wnd|_nXdS(N(tcomplexR{R
(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytend_complexscCs$y
||_Wnd|_nXdS(N(R{R
(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
end_strings
cCst|jtr!|j|_nit|jtr`t|j|jpHd|jpTt|_n*t	|j|jpud|jpt
|_dS(Ns%s(R)R{R*RRKt
StringCellRRSRtNumericCellR(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt	end_value%s		cCs+t||jpd|jpt|_dS(Ns%s(tFormulaCellRRSRR(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytend_formula1scCs#|jj|j|j|jdS(N(RjR+RR R(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pytend_cell6s(RhRiRRfRlRpRnRRt
start_formulaRRRRRRRR(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRes 														R*cBseZdZRS(N(RhRiR
R(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR*9s	RcBsVeZdedZdZdZdZdZdZdZ	dZ
RS(	s%scCs[t|ttttfs!t|tttfks<t||_	||_
||_dS(N(R)RRRRR(RRRR{RRS(RR{RRS((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRGs
!		cCs|jS(N(R{(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRNscCs:y|j|j}Wnt|j}nX||jfS(N(RR{RKRS(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRDQs
cCs=t|dt|jj}dt|j|j|fS(Nt_xml_s(<value align="%s" format="%s">%s</value>(RuttypeR{Rht	align2xmlRSR(RRy((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRWXs

cCs8d|jkodknr*d|jS|jSdS(Niis
<int>%s</int>IiI(R{t	_xml_long(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt_xml_int_scCsd|jS(Ns<long>%s</long>(R{(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRescCsdt|jS(Ns<double>%s</double>(treprR{(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
_xml_floathscCsdt|jS(Ns<complex>%s</double>(RR{(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt_xml_complexks(RhRiRRRRDRWRRRR(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyREs						RcBs2eZdedZdZdZdZRS(s%scCsUt|ttfst|tttfks6t||_||_||_	dS(N(
R)RKtunicodeR(RRRRRRRS(RRRRRS((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRps
		cCs|jS(N(RR(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRwscCs|j|jfS(N(RRRS(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRDzscCs-d}|t|j|jtj|jfS(Ns9<value align="%s" format="%s"><string>%s</string></value>(RRSRRXRYRR(Rts((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRW}s

(RhRiRRRRDRW(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRns		RcBsDeZdedZdZdZdZdZdZRS(s%scCsV|tttfkst||_t|j|_||_||_|j	dS(N(
RRRR(tformulat	translatet
translatedRRSRB(RRRRS((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs			cCs
d|_dS(N(R
R{(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRBscCs|jdkry4|jddt|j|jd|_Wqtjd}t|drw|j	|_qt
||_qXn|jS(Ns from __future__ import division
s__value__ = eval(%s)t	__value__iRh(R{R
tr_execRRtr_evalR1texc_infoRRhRK(RRtexc((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs	cCs:y|j|j}Wnt|j}nX||jfS(N(RR{RKRS(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRDs
cCsdt|j|j|jfS(Ns,<formula align="%s" format="%s">%s</formula>(RRSRR(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRWs
cCsg}xtjd|jD]}tjd|}	|	dk	r|	j\}
}t|
}t|}
||ko|knr||
ko|knrt|||
|}qn|j	|qWt
dj||j|j
S(Ns(\w+)s^([A-Z]+)([1-9][0-9]*)$RE(tretsplitRtmatchR
tgroupstcolname2numRtcellnameR"RRZRRS(RR#R$R%R&R6R7R[tpartRtsxtsyRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR5s8(	RhRiRRRBRRDRWR5(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs				c	Csg}xtjd|D]}tjd|}|dkrM|j|q|j\}}}}t|}|dkrd||f}n"t|}d||||f}|j|qWdj|S(sTranslate a formula containing fancy cell names to valid Python code.

    Examples:
        B4 -> cell(2, 4)
        B4:Z100 -> cells(2, 4, 26, 100)
    s(\w+(?::\w+)?)s2^([A-Z]+)([1-9][0-9]*)(?::([A-Z]+)([1-9][0-9]*))?$scell(%s, %s)scells(%s, %s, %s, %s)REN(RRRR
R"RRRZ(	RR[RRR#R$R%R&R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCs&|dkstt|t|S(sETranslate a cell coordinate to a fancy cell name (e.g. (1, 1)->'A1').i(R(RIRK(RR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsk|j}d}xR|D]J}d|ko6dknsAt|dt|tdd}qW|S(sCTranslate a column name to number (e.g. 'A'->1, 'Z'->26, 'AA'->27).itAtZii(tupperR(tord(RRtc((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
"&cCs\|dkstd}x=|rWt|dd\}}t|td|}qW|S(s6Translate a column number to name (e.g. 1->'A', etc.).iREiiR(R(tdivmodtchrR(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRIs	tSheetGUIcBseZdZddddZdZdZdZdZd	Zd
Z	dZ
dZd
ZdZ
dZeZdZdZdZdZdZdZdZdZdZdZdZdZRS(s7Beginnings of a GUI for a spreadsheet.

    TO DO:
    - clear multiple cells
    - Insert, clear, remove rows or columns
    - Show new contents while typing
    - Scroll bars
    - Grow grid when window is grown
    - Proper menus
    - Undo, redo
    - Cut, copy and paste
    - Formatting and alignment
    s
sheet1.xmli
icCs*||_t|_tjj|r:|jj|n|jj\}}t||}t||}t	j	|_
|j
jd|jt	j|j
dddd|_
t	j|j
|_t	j|j
ddd	|j|_t	j|j
|_|jjd
ddd
dd|j
jd
d|jjd
d|jjd
ddd
dd|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|j||d|_d|_ |j!d
d
|j"dS(slConstructor.

        Load the sheet from the filename argument.
        Set up the Tk widget tree.
        sSpreadsheet: %sRRtA1tfontt	helveticaitboldtSavetcommandtsidetbottomtexpanditfilltbothR	R
Rs<Return>s<Shift-Return>s<Tab>s<Shift-Tab>s<Delete>s<Escape>N(RiR(#RaRRjtostpathtisfileRgRAR>tTktroottwm_titletLabeltbeacontEntrytentrytButtonRct
savebuttontFrametcellgridtpacktbindtreturn_eventtshift_return_eventt	tab_eventtshift_tab_eventtdelete_eventtescape_eventtmakegridR
t	currentxytcornerxyt
setcurrenttsync(RRatrowstcolumnsR?R@((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs<			cCsr|j|jkr>|jdk	r>|jj|j|jn|jj|j|j|jjdddS(Nitendtbreak(	RRR
RjR0R-RRtdelete(Rtevent((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR's!
cCs#|j\}}|j||dS(N(Rt
load_entry(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR0scCs|jj||}|dkr*d}n1t|trId|j}n|j\}}|jjdd|jj	d||jj
dddS(NREt=iR(RjRR
R)RRRDRRtinserttselection_range(RRR RRRRS((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR4s	c
Cs||_||_i|_tj|jdd}|jdddddd|jd|jxt	d	|d	D]}|jj
|d
dtj|jdt|dd}|jd|dddd
||j|df<||_d|_
|jd|j|jd|j|jd|j|jd|jqvWxt	d	|d	D]}tj|jdt|dd}|jddd|dd
||jd|f<d|_||_
|jd|j|jd|j|jd|j|jd|jq[Wxt	d	|d	D]}xt	d	|d	D]}tj|jdddddd}|jd|d|dd||j||f<||_||_
|jd|j|jd|j|jd|j|jd|jqDWq*WdS(sHelper to create the grid of GUI cells.

        The edge (x==0 or y==0) is filled with labels; the rest is real cells.
        trelieftraisedtcolumniR}tstickytNSWEs<ButtonPress-1>itminsizei@RRtWEs<B1-Motion>s<ButtonRelease-1>s<Shift-Button-1>tsunkentbgtwhitetfgtblackN(RRt	gridcellsRRRtgrid_configureRt	selectallR!tgrid_columnconfigureRIt_SheetGUI__xt_SheetGUI__ytselectcolumntextendcolumnRKt	selectrowt	extendrowtpresstmotiontrelease(RRRRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR@sN			$		$				cCs*|jdd|jtjtjdS(Ni(Rt	setcornerR1R2(RR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRrscCs<|j|\}}|j|d|j|tjdS(Ni(twhichxyRRR1R2(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRvscCsR|j|\}}|dkrN|j|jdd|j|tjndS(Nii(RRRRR1R2(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyR{scCs<|j|\}}|jd||jtj|dS(Ni(RRRR1R2(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsR|j|\}}|dkrN|jd|jd|jtj|ndS(Nii(RRRRR1R2(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsD|j|\}}|dkr@|dkr@|j||ndS(Ni(RR(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsD|j|\}}|dkr@|dkr@|j||ndS(Ni(RR(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRscCsh|jj|j|j}|dk	rdt|tjrdy|j|j	fSWqdt
k
r`qdXndS(Ni(ii(Rtwinfo_containingtx_rootty_rootR
R)RRRRtAttributeError(RRR((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs|jj|jdS(N(RjRcRa(R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRcscCs|jdk	r|jn|jt|||jd<|j|||jj||f|_d|_	|j
j|j}|dk	rd|d<ndS(sMake (x, y) the current cell.RRtyellowRN(RR
tchange_cellt
clearfocusRRRRt	focus_setRRR'(RRR tgridcell((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs


	c	Csc|jdks$|j||fkr8|j||dS|j||f|_|j\}}|jpo|j\}}||kr||}}n||kr||}}nxh|jjD]W\\}}}||ko|knr||ko|knrd|d<qqW|jj|j}|dk	rId|d<n|j||||dS(Nt	lightBlueRR(	RR
RRRRRLR't	setbeacon(	RRR R#R$R%R&RR
((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs$$
"8
cCs#||kodknrD||ko6tjknrDd}n||fdtjfkr||krxd|}qd||f}n||fdtjfkr||krdt|}qdt|t|f}n.t|j}t|j}d||f}||jd<dS(Nit:s%ds%d:%ds%ss%s:%sRR(R1R2RIRRRR(RR#R$R%R&tnametname1tname2((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs;	
cCs|jdk	r|j\}}|jp-|j\}}||krR||}}n||krn||}}nxk|jjD]W\\}}}||ko|knr~||ko|knr~d|d<q~q~WndS(NRR(RR
RRRL(RR#R$R%R&RR R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs"8cCs1|j|j\}}|j||ddS(sCallback for the Return key.iR(RRR(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs:|j|j\}}|j|td|ddS(s0Callback for the Return key with Shift modifier.iR(RRRR>(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs1|j|j\}}|j|d|dS(sCallback for the Tab key.iR(RRR(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs:|j|j\}}|jtd|d|dS(s-Callback for the Tab key with Shift modifier.iR(RRRR>(RRRR ((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
cCs|j\}}|jj}d}|jdrFt|d}nGxDtttt	fD]0}y||}Wn
qYqYXt
|}PqYW|dkr|rt|}n|dkr|jj
||n|jj||||jdS(s+Set the current cell from the entry widget.RiN(RRR'R
t
startswithRRRRRRRRjR-R+R(RRR RRRtclsR{((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs$cCs|jjx|jjD]\\}}}|dks|dkrMqn|jj||}|dkr{d|d<qt|dr|j\}}nt|t	}}||d<t
||d<qWdS(s(Fill the GUI cells from the sheet cells.iRERRRDtanchorN(RjRRRLRR
RRDRKRtalign2anchor(RRR R
RRRRS((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs
"

(RhRit__doc__RRRRRRRRRRRRRRRcRRRRRRRRRR(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyRs4-					2																			cCsddl}t}xtddD]}xtddD]}|dkr\t|}nU|dkrwt|}n:t|d}td|}d||f}t|}|j|||q;Wq%W|j|jddS(sBasic non-gui self-test.iNiis%s*%ss
sheet1.xml(	RRR!RRRR+RVRc(RtaRR Rtc1tc2R((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt
test_basic,s	
cCs@tjdrtjd}nd}t|}|jjdS(s	GUI test.is
sheet1.xmlN(R1targvRRtmainloop(Ratg((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyttest_guiBs

R(#RRRR1RXRtxml.parsersRRRRRRRRMRRRRRReR*RRRRRRRItTkinterRRRRRh(((s./usr/lib64/python2.7/Demo/tkinter/guido/ss1.pyt<module>s@				Y)6						C