ó V Qc@sLddlTddlZddd„ƒYZd„ZedkrHeƒndS(i˙˙˙˙(t*Nt ElectronscBs&eZdd„Zd„Zd„ZRS(c Cs||_tƒ|_}t|ƒ|_}|jƒ|j|dƒ|j|dƒ}}|r|j|d|dd|ddƒ|_ng|_ d \}}} } xWt |ƒD]I} |j ||| | d d ƒ} |j j | ƒ|d| d}} qˇW|jj ƒdS(Ntwidththeightitbitmapt foregroundtbluei iFiiJtfilltred(i iFiiJ(tntTkttktCanvastcanvastpacktgetintt create_bitmapRtpiecestranget create_ovaltappendtupdate( tselfR RR tcRRtx1ty1tx2ty2titp((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pyt__init__s   ' cCsq|j}xT|jD]I}tjtddƒƒ}tjtddƒƒ}|j|||ƒqW|jjƒdS(Niţ˙˙˙iiý˙˙˙(R RtrandomtchoiceRtmoveR R(RR RRtxty((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pyt random_move+s  cCshy+x$tdƒD]}|j|jƒqWWn6tk rcy|jjƒWqdtk r_qdXnXdS(Niô(RR$R tTclErrorR tdestroy(RR((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pytrun4s  N(t__name__t __module__tNoneRR$R'(((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pyRs  cCsŤddl}ddl}|jdr>|j|jdƒ}nd}|jdrˆ|jd}|ddkr{|d}qŽd|}nd}t||ƒ}|jƒdS(Ni˙˙˙˙iiiit@(tsyststringtargvtatoiR*RR'(R,R-R Rth((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pytmain@s     t__main__((tTkinterRRR1R((((s4/usr/lib64/python2.7/Demo/tkinter/guido/electrons.pyts  -