HKc@s:ddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddkZddkZddkZddkZdeifdYZdeifdYZdefdYZdeifd YZd eifd YZd eifd YZdeifdYZde fdYZ!de!fdYZ"dei#fdYZ$dei%fdYZ&dei'fdYZ(de(fdYZ)dei*fdYZ+de fdYZ,d e$fd!YZ-d"eifd#YZ.d$e.fd%YZ/d&eifd'YZ0d(e0fd)YZ1d*eifd+YZ2d,eifd-YZ3d.e3fd/YZ4d0ei5fd1YZ6d2ei5fd3YZ7d4e7fd5YZ8d6ei5fd7YZ9d8ei:fd9YZ;d:e;fd;YZ<d<ei:fd=YZ=d>e=fd?YZ>d@ei:fdAYZ?dBe?fdCYZ@dDei:fdEYZAdFeAfdGYZBdHei:fdIYZCdJeCfdKYZDdLeifdMYZEdNeEfdOYZFdPZGdQZHdRZIdSZJdTZKdUZLdVZMdWZNdXZOdYZPdZZQeRd[jod\ZSeiZThd]d^tmenusRaRR`tkeyst add_cascadet isinstancetdictRWt add_commandtadd_checkbuttontadd_radiobuttont add_separatorR1tentryconfigureRG( RRIRitorderRatdo_listtamenuROt config_dicttmytype((s gwidgets.pycRsH         ) ) 3 = cCs |i|S(N(RG(RR_((s gwidgets.pyct menu_indexscCs|i|i|S(N(RiRG(RR_tname((s gwidgets.pyct submenu_indexscCs |i|S(N(Ri(RR_((s gwidgets.pycR_ sN(RRRRRxRzR_(((s gwidgets.pycR^sF  t EasyScalecBseZddZRS(cKsdtii||||oC|id}|idti|i||id|ndS(Ntstate(RtScaleRRTR>tNORMALR(RtmasterRRtmystate((s gwidgets.pycRs  N(RRRR(((s gwidgets.pycR{stEasyCanvasObjectcBsVeZdZdZdZddZdZdZddZ dZ RS( cOs8|tiijot|||Snti|SdS(N(RtCanvast create_windowtEasyCanvasWindowtobjectt__new__(tclstcreatortargsR((s gwidgets.pycR!scOsy|iodSnWntj o||_|idt}t|idd|_|idt|_|||||_d|_ |_ t|_ |o|i qnXdS(Ntmoveabletbuttonitrespect(tidRtcanvastpoptFalseR4RR]RRtmove_xtmove_yt is_moveablet make_moveable(RRRRRR((s gwidgets.pycR7s    cCsL|djot||_nd|id}d|id}||fS(Nss(RR4R(RRtevent_start_strt event_end_str((s gwidgets.pyctbinding_stringsNs  cCsZ|i|\}}|ii|i||i|ii|i||it|_dS(N(RRttag_bindRtmove_metstop_meR]R(RRRR((s gwidgets.pycRWsc Cs|idjo|i|_|i|_n|i|i}|i|i}|ii|idjo$|i||_|i||_n|ii|i|||i o6|ii |i\}}}}t |ii d}d} } ||jo||} nH|t |ii d|jo$t |ii d||} n||jo||} nH|t |ii d|jo$t |ii d||} n| p| o|ii|i| | qndS(NtwindowthighlightthicknessiR&R%( RRRNtyRRttypeRtmoveRtbboxR2RT( Rteventtmovextmoveytx0ty0tx1ty1tbdt correction_xt correction_y((s gwidgets.pycR^s.  !  #$ #$cCsd|_|_dS(N(RRR(RR((s gwidgets.pycRscCsZ|i|\}}|ii|i||i|ii|i||it|_dS(N(RRt tag_unbindRRRRR(RRRR((s gwidgets.pyctmake_unmoveablescCs|idS(N(R(R((s gwidgets.pyct delete_mesN( RRRRRRRRRRR(((s gwidgets.pycRs    !  RcBs)eZdZddZddZRS(cOs ti|S(N(RR(RRR((s gwidgets.pycRscCs|i|\}}yW|ii|ii|id}|i||i|i||it|_ Wnt j onXdS(NR( RRt nametowidgettitemcgetRtbindRRR]RtKeyError(RRRRtwidget((s gwidgets.pycRs$ cCsz|i|\}}yK|ii|ii|id}|i||i|t|_Wntj onXdS(NR( RRRRRtunbindRRR(RRRRR((s gwidgets.pycRs$   N(RRRRRR(((s gwidgets.pycRs  t EasyCanvascBseZdZdZddZdZdZdZdZ dZ dZ d Z d d Z d Zd edZdZddZRS(cKsDtii|||||_ti|_t|_d|_ dS(Ns ( RRRRtgptRichDictt easy_itemsR]t uct_onetimet uct_event(RRR((s gwidgets.pycRs   cCs[xA|i|D]0}|ii|d}|o|iqqWtii||dS(N(t find_withtagRRRRRRtdelete(RRORt easy_item((s gwidgets.pycRs cKsJ|o||dcCs0|i||i|idd||_dS(Ntcursortxterm(Rtcreate_user_textR>R(Rt event_stringtonetime((s gwidgets.pyctinitiate_user_created_textscCse|i|i|i}x9|i|djo"|i|i|id|}qW|i|dS(Nttexttstart(t find_closestRNRRR(RRtmytext((s gwidgets.pyctdelete_user_text s #ic sfd}tidtdididfd|}|it|dddhtid <ti d ( RRRRtinputt option_framet drop_frameRMRNt type_frameR((RRRRRRRRs gwidgets.pycRs.$5?-K3$"" N(RRRRRRRRRRRRRRRR]RRR(((s gwidgets.pycRs           tEasyTextcBs"eZdddZdZdZdZdZdZdZ dZ dddZ ddd Z ddd Z ddd Zd Zed ZdZdddZdddZdddZdZdZdZdZdddZedddZRS(cOs}tii|||||oG|idtijo|i|d|qg|i|d|nd|_d|_dS(NR|ttagss1.0RQ( RRRRTtDISABLEDt secure_setalltsetallt found_indextold_text(RRRRRR((s gwidgets.pycRAs cKs?|i|d|i|d|o|i||ndS(Ns1.0(ttag_addt tag_removet tag_config(Rttagtconfigure_options((s gwidgets.pyctnew_tagOscCs |iddddtidS(NRtbegins1.0tend(ttag_onlyRRE(R((s gwidgets.pycttag_allVscKs|i|id|dS(NR(R(R!(RR((s gwidgets.pyct config_allZs cCs|idtidS(NR|(R>RR~(R((s gwidgets.pyctenable_scCs|idtidS(NR|(R>RR(R((s gwidgets.pyctdisablecscCs|idti}|S(Ns1.0(RSRRE(Rtdata((s gwidgets.pyctgetallgscCs)d}t||||}|S(NcSsZg}t|ttfo"x7|D]}|i|q#Wn|o|i|n|S(N(RltlistttupleR (t some_tagstmytagstatag((s gwidgets.pyct tag_to_listps(R/(RR"RR3R1((s gwidgets.pyct combine_tagsls cCs9|i||}tii|||||idS(N(R4RRRDR((RRGRRR"((s gwidgets.pycRD{scCs6|i||}|iti|||idS(N(R4RDRRER((RRRR"((s gwidgets.pycR scCsU|ddjo|d}n|i||}|iti|||idS(Nis (R4RDRRER((RRRR"((s gwidgets.pyct append_lines cCs4|i|id|d|d||idS(Ns1.0RR"(tclearRDR((RRRR"((s gwidgets.pycRs cOs|i||dS(N(RD(RtargR((s gwidgets.pycRscCsF|idti|o(x%|iD]}|i|q'WndS(Ns1.0(RRREt tag_namest tag_delete(RRR2((s gwidgets.pycR6s  cCs_d}|i||}x@|o8|i|d|d|d}|i||}qWdS(Ns1.0ii(t tag_nextrangeR(RR"RGtrange((s gwidgets.pyct delete_by_tags cCsH|i|i|id|d|d||i|idS(Ns1.0RR"(R*R6RDR+R((RRRR"((s gwidgets.pycRs    cCs>|i|i||d|d||i|idS(NRR"(R*RDR+R((RRGRRR"((s gwidgets.pyct secure_sets  s1.0cCs-|i|dti|i|||dS(Ns1.0(R RRER(RR"R%R&((s gwidgets.pycR'scCsK|i|}t|idd}t|idd}||fS(Nt.ii(RGR2tsplit(RRGt text_indexR'tcol((s gwidgets.pyctint_row_col_indexscCsdit|t|gS(NR>(tjoinR4(RR'R(((s gwidgets.pycR@scCs|i||i|dS(N(tsee(RR%R&((s gwidgets.pyct show_ranges cCs|iti||dS(N(R'RtSEL(RR%R&((s gwidgets.pyctselectsc Cs5|ptidd}n|ptidd}n|d}|i|\}}d}|d}xM|djo?|i|i|||jo|d}Pn|d}qjW|}|}xM||djo;|i|i|||jo |}Pn|d}qW|i|||i||fS( Ns({[$"t's ,.;:?!*)]}%"s iiii(tstgt whitespaceRBRSR@( RRGt start_charst end_charsR'R(t start_columntcountt end_column((s gwidgets.pyctget_word_indiciess.   " "c Cs|djodSn||ijo|iti|_n@|io5|i|i\}}|i||d|_n|i}|i||idd|_|idjo/|djo"|i||idd|_n|io|i|o(|i |id|d|\}} n>|i}|i|i\}}|i||t |} |i || |i || n||_d}} ||_|| fS(NRQitnocases1.0RKRL( RRGRtINSERTRRBR@tsearcht focus_setRPR0RGRE( RtstexttwordRKRLR'R(t old_indexR%R&((s gwidgets.pyct search_its0   "  (    N(RRRRR$R(R)R*R+R-R4RDR R5RRRR6R<RR=R'RBR@RERGRPRX(((s gwidgets.pycR<s0              RcBsJeZdeiddZdZdZdZdZdZ RS(iRQc Ks>t||_tii||d|id|d||dS(NReRR(RtvarRt CheckbuttonR(RRtinitRRR((s gwidgets.pycRscCs |iiS(N(RYRS(R((s gwidgets.pycRSscCs|idS(N(RG(R((s gwidgets.pycton!scCs|idS(N(tdeselect(R((s gwidgets.pyctoff$scCst|iS(N(tboolRS(R((s gwidgets.pyctis_on'scCst|i S(N(R_RS(R((s gwidgets.pyctis_off*s( RRRR7RRSR\R^R`Ra(((s gwidgets.pycRs     t EasyCheckboxcBseZRS((RR(((s gwidgets.pycRb-stEasyRadiobuttonscBs>eZdedeiddZdZdZdZRS(iRQc Ks|p#tii||d|d|ntii||d|t||_|oti} ti} nti} ti} ||_ h|_ xht |i D]W\} } ti |d|id| d| ||i | <|i | i d| d| qWdS(NtreliefRRReRRR(Rt LabelFrameRRRYR7R R8Rtlabelstrbt enumeratet RadiobuttonR( RRRfR[tverticalRRdRRRRRNRb((s gwidgets.pycR4s #       .cCs |iiS(N(RYRS(R((s gwidgets.pycRSQscCs,|ii||i|i|idS(N(RYRRgRftinvoke(RR((s gwidgets.pyct set_by_valueUscCs|i|idS(N(RgRk(RRb((s gwidgets.pyct set_by_labelZs( RRR]RtFLATRRSRlRm(((s gwidgets.pycRc3s  t PlotSeriesc BseZdeddddeddeed ZdZdZdZd Z d Z d Z d Z d Z ddZdZddZddZddZddZRS(tgenerictsquareRiicCsWti|ddddddddd d d d d g tt|i|_dddddg|_|i|i p|i |_ ng}|D]\}}||q~}g}|D]\}}||q~}t ||_ t ||_t ||_t ||_|ii|id|i|i|io|indS(NtcharttpointsRyRXtstyletborderRRt line_smootht line_colort line_widtht line_dashtlegendRqRttriangletdiamonds(Rtparams_to_attributestlocalst valid_tagRyR"Rt style_listtassign_marker_functionRwRuR3txmaxtmintxmintymaxtyminRrRt option_windowtplotRztmake_legend_entry(RRrRsRyRXRtRuRRRvRwRxRyRzRMRNRtxvalst_[2]tyvals((s gwidgets.pycRbs =  ''  c Cs|io|ii|i|ioJ|iid d gd|id|id|id|id|i n|i o|i ddd |in|ii d t id t indS(Nii iRtsmoothR&RtdashRRR(ii (ii (Rzt legend_picRR"RXRRwRvRxtget_dashRttmarker_functionRRRR7(R((s gwidgets.pyctupdate_legend_pictures  J c Csti|iid|ii|_ti|iddddd|iiddd|ii|_ti|id|i d|ii|_ |ii d |ii |ii d |ii |i i d |ii |ii d |ii |ii d |ii |i i d |ii |ii d |ii|ii d |ii|i i d |ii|i|i id tid ti|iid tid tidS(Nt backgroundR&iR%RithighlightbackgroundRs s sRR(RR/RrRzRt legend_entryRRtLabelRyt legend_textRtstart_movementt legend_movingt stop_movementRRRR7R (R((s gwidgets.pycRs$?* cCs|idjo|i|_nj|idjo|i|_nJ|idjo|i|_n*|idjo|i|_n d|_dS(NRR|R{Rq(Rtt make_circleRt make_diamondt make_trianglet make_squareR(R((s gwidgets.pycRscCs>|ii|iy|iiWntj onXdS(N(RrRR"RtdestroyR(R((s gwidgets.pyctremoves cCs5|ii|i|i|i|idS(N(RrRR"tget_canvas_pointst plot_linet plot_points(R((s gwidgets.pycRs  cCs|io d}nd}|S(Nii(ii(RyR(Rt dash_value((s gwidgets.pycRs  c sdtif fdY} f d}tiidddtd|}|iti|}id d g}d d d d d g}t||dddii i t dddi dddi i i dtiti|dd}|i dtiti|dd}t|dddtit|dddtit|dddti t |dddidddii dtii dti i dtii |i dtidti|iti|dd |d i|d!i|d"i|idS(#Nt ColorOptioncs eZfdZdZRS(cstii|||_ti|d|d|i|_ti|ddddd|i|_|ii dti |ii dti |i dti dd dS( NRRR&i R%RRRi( RR/RtcolortButtont get_colorRRtpatchRR tBOTTOMR(RRR(t color_frame(s gwidgets.pycRs !'cSsFti|i\}}|o#||_|iid|indS(NR(ttkcctaskcolorRRt configure(Rt color_tuplettkcolor((s gwidgets.pycRs (RRRR((R(s gwidgets.pycRs csii_ii_i_i_i_t i_ t i_ t i_ i_ iidS(N(RRSRtRRRRuRRwR_RXRvRyRxRR(( t fill_colort style_rbsRtline_color_optiontuse_linet smooth_linet width_linet size_entryt border_colort dashed_line(s gwidgets.pyct apply_optionss     ttitlesPlot Series OptionsRRiRtSquaretCircletTriangletDiamondRs Point StyleR[RtSizeR&tvartypet nonneginttvarvalueRis Line Styles Use a lines Smooth lines Dashed linetWidthRtColorstBordertFilltLine(RR/t modal_windowRrRR]R RRcRGRtt super_entryRRRRReRR2RXRvRyRxR7RR8RuRRwR( RRRRtowt style_frametstylest blank_labelt lstyle_frame(( RRRRRRRRRRRs gwidgets.pycRs6* $** !!!* cCsOg}|iD]1\}}||ii||ii|fq~|_dS(N(RsRrtx_pixelsty_pixelst canvas_points(RRMRNR((s gwidgets.pycRsc Cs|io|i}t|idjo|d}n|pD|ii|d|id|id|id|id|i q|i|d|id|id|id|id|i ndS(NiiRRR&RR( RXRR0RrRRwRvRxR"R(RRt linepoints((s gwidgets.pycRs  DcCs>|io0x-|iD]}|i|d|dqWndS(Nii(RtRR(Rtpoint((s gwidgets.pycRs  c Cs|pb|ii||i||if||id||idfd|id|id|in\|i||i||if||id||idfd|id|id|idS(NiRtoutlineR(RrRRRRuR"(RRNRR((s gwidgets.pycR sbc Cs|pb|ii||i||if||id||idfd|id|id|in\|i||i||if||id||idfd|id|id|idS(NiRRR(RrRRRRuR"(RRNRR((s gwidgets.pycRsbc Cst|idd}|p`|ii|||f|||f|||f|||fd|id|id|inZ|i|||f|||f|||f|||fd|id|id|idS(Ng -?iRRR(R2RRrRRRuR"(RRNRRtdelta((s gwidgets.pycRs`c Cs|idd}d|d}ti|||d}|p[|ii|||f||||f||||fd|id|id|inU|i|||f||||f||||fd|id|id|idS( Ng?g?g?gʡE?iRRR(RtmathtsqrtRrRRRuR"(RRNRRttsizet half_sidetycb((s gwidgets.pycRs [N(RRRRR]RRRRRRRRRRRRRRR(((s gwidgets.pycRo^s*     =     t GenericPlotcBseZdddddddd,d,d,dddddeeeeeeddeeedd,d,d Zd Zd Zd Zd Z dZ dZ dZ dZ dZdZdZd,dddZdedZdedZdZddedZddedZdZdZdZdZd Zd!Zd"Zd#Zd$d%Zd$d&Z d$d'Z!ddd,d$d(Z"d)Z#d*Z$d+Z%RS(-iiRiiiiiRcCsA|djo d}nti||d|d|d|ti|dddddd d d d d ddddddddddddddddddgt|iptidd d!d"|_n|o"t|_ |_ |_ |_ n|o|i o ||_ n|o|i o ||_n|i|i|i|i|i|io0|id#d$|i|id#d%|inh|_d&|_|i|id'|_d&|_t|_|i|i|id(d)d*t i!|_"|i#|_$|i%|_&|i'o|i(ndS(+NtsystemtSystemButtonFaceR%R&RRtxstarttxendtystarttyendRtxtitletytitletxmajortymajortxminortyminortticklentusextuseyt xgridmajort xgridminort ygridmajort ygridminortxdigitstydigitst show_coordst uselegendtxgridlinecolortygridlinecolorRt helveticaRitcurvessiiRRzR()RRRR}R~RRRR]RRRRRRt y_high_lowt x_left_rightt draw_x_axist draw_y_axist axis_titlesRRtdisplay_coordst collectionstnum_collectionst create_legendR&tlegendxtlegendyRtmovingRRtNEt legend_windowt color_cyclet color_grabbert shape_cyclet shape_grabberRt show_legend(RRR%R&RRRRRRRRRRRRRRRRRRRRRRt allgridlinesRt gridlinecolorRR((s gwidgets.pycR7s>  "j "             * ccsnddddg}d}xOtoGy||}Wn#tj od}||}nX|d}|VqWdS(NRqRR{R|ii(R]RW(Rt shape_listt shape_counttshape((s gwidgets.pycRns c #sddddddddd d d d g fd }d}d}xttol|||\}}}}x?ti||i|djo|||\}}}}qmW||fVqHWdS(NRRRRtpurpletoranges sea greenRtpinkRRtbrownc sy|}Wn-tj o!d}|d}|}nX|djo|}nTy-||jo|d}n |}Wn#tj od}|}nX|d}||||fS(Niii(RW(t border_countt fill_countRuR(t color_list(s gwidgets.pyct next_color|s"    iig?(R]tcrtcolor_distanceR(RRRRRuR((Rs gwidgets.pycRzs* cCspti|iddddd|i|_|iid|i|iid|i|iid|idS( NRdtridgeRiRs s s( RR/RRRzRRRR(R((s gwidgets.pycRs*cCsLt|_|i\}}||_||_|id\|_|_dS(NRz(R]Rtwinfo_pointerxyRR Rtstartxtstarty(RRtx2ty2((s gwidgets.pycRs    cCs t|_dS(N(RR(RR((s gwidgets.pycRscCs_|ioQ|i|i|i|_|i|i|i|_|id|i|indS(NRz(RRRRRR RR(RR((s gwidgets.pycRs cCs|i|id|idS(NR(t itemconfigureRRz(R((s gwidgets.pycR scCs|i|idddS(NR(R RR(R((s gwidgets.pyct hide_legendscCs|i|_d|iidd|_|ioY|i|i|iidd|_|io$|i|iidd|_qndS(Nit linespaceitascent(R%tylowRtmetricstyhighRRR(R((s gwidgets.pycRs   ' cCsOd|_|ip6|i|iiti|i|id|_n|id|iiti|i |id|_ |io|i|i t |iiti|i |i|iiti|i|id|_|ioTt g}|iD]}||ii|q~|_|i|id|_qKndS(Nii(txleftRRtmeasureRtstrflRRR&RtxrightRR3RRRRt ytitle_width(RRMRN((s gwidgets.pycRs  66 ` 9c Cs |id|ioh|i|i|id}|i|iiddd}|i||ddd|id|in|io|d|i d}|i |i |i d}|i||dddd i g}|iD] }||q~d|indS( Nt axis_titleiR"iRRRis ( RRR'R*R%RR%RRR+R&R$RC(RtxcoordtycoordRMRN((s gwidgets.pycRs  !, g?cCsQ|o|}|}n|id|dt|id|dt|idS(Ntmargintreplot(tauto_scale_x_axisRtauto_scale_y_axist replot_series(RR/tymargintxmargin((s gwidgets.pyctauto_scale_axess  c Cstg}|iiD]}||iq~}tg}|iiD]}||iqJ~}|||}|||} |id|d| d|dS(NRRR0(R3RRYRRRt change_x_axis( RR/R0RMRNRRRRR((s gwidgets.pycR1s 33c Cstg}|iiD]}||iq~}tg}|iiD]}||iqJ~}|||}|||} || jod}td| } n|id|d| d|dS(Ngg?RRR0(R3RRYRRRt change_y_axis( RR/R0RMRRRRRR((s gwidgets.pycR2s33 cCs(x!|iiD]}|iqWdS(N(RRYR(Rtseries((s gwidgets.pycR3scCsV||_||_|id|i|i|i|o|indS(Nsx-axis(RRRR6RRR3(RRRR0((s gwidgets.pycR7s      cCsz||_||_|id|id|i|id|i|i|i|o|indS(Nsy-axissx-axisR(RRRR6RRRR3(RRRR0((s gwidgets.pycR8s         cCs4t|||d}||jo | }n|S(Ni(tabs(RRR&tnumtinterval((s gwidgets.pyctmajor_interval s  cCs8|i|id|it||i|i|iS(Ni(R'R*tfloatRR(RR((s gwidgets.pycRscCs4|it|i|i||i|i|iS(N(R$R>R&RR(RR((s gwidgets.pycRscCs|ipdSn|i|i|if|i|ifgdd|i|i|i|i}|i}yt ||i d}Wnt j o d}nXxt |idD]}|i |}|i||if||i|idfdd|i||i|iddtidddti||id|i|ioF|djo9|i||idf||ifddd |in|d|ijoxt |i D]}|i ||d|}|i||if||i|id fdd|io9|i||idf||ifddd |iqqWn||}qW|idd |idS(NRsx-axisiiRtxlabelsRRRRiRs (sx-axissxlabels(sx-axiss xgridmajor(sx-axiss xgridminor(RRR'R$R*R=RRRR>RtZeroDivisionErrorR;RRRRR8RR)RRRR&RRRtx_axis_options(Rt major_intR-t minor_intRbtxpixttickt minor_pix((s gwidgets.pycRs2 1  3K93 Ac skfd} f d}tidddtd|}|it|ddd d d id d dti|it|ddd d d id d dti|it|ddd dd i d ddti|it|ddd i d ddti|it|ddd dd i d ddti|it|ddd dd i d ddti |it |didddti|it |didddtiti|dd}ti|dddid|i|i|dti|idS( Ncs=tiid\}}|oid|ndS(Ntbg(RRRTR>(RR(t color_button(s gwidgets.pyct change_color:scsyi}i}i_i_ i_i_i_id_id|d|i_ i Wnt j onXdS(NRGRR( RSRRRRRRTRR7RRRH(RR( tmajorstmaxvaltminorstminvalRHRRtdigitst gridminorst gridmajors(s gwidgets.pyct get_options>s  RsX-axis OptionsRRRs Left ValueRR>RR&i Rs Right ValuesDecimal placesR2itTitleisMajor TickmarksisMinor TickmarksR[RsMajor GridlinessMinor GridlinessGridline Colors RGR(RRR]R R RRR7RRRRRRRRReRRRR(RRRIRQtopt_wintgrid_color_frame(( RKRJRMRPRRNRHRORRLs gwidgets.pycRA9s *!999399--$ cCsy|ipdSn|i|i|if|i|ifgdd|i|i|i|i}|i}y||i d}Wnt j o d}nXxt |idD]}|i |}|i|i|f|i|i d|fdd|i|i|i |dtidddti||id|i|ioF|djo9|i|id|f|i|fddd |in|d|ijoxt |i D]}|i ||d|}|i|i|f|i|i d |fdd|io9|i|id|f|i|fddd |iqqWn||}qW|idd |idS(NRsy-axisiiRtylabelsRRRRiRs (sy-axissylabels(sy-axiss ygridmajor(sy-axiss ygridminor(RRR'R$R&R=RRRRR@R;RRRRR6RR)RRRR*RRRty_axis_options(RRBR.RCRbtypixRERF((s gwidgets.pycR\s2 1  3G93 Ac skfd} f d}tidddtd|}|it|ddd d d id d dti|it|ddd d d id d dti|it|ddd i d ddti|it|ddd dd i d ddti|it|ddd dd i d ddti |it|ddd dd i d ddti|it |didddti|it |didddtiti|dd}ti|dddid|i|i|dti|idS( Ncs=tiid\}}|oid|ndS(NRG(RRRTR>(RR(RH(s gwidgets.pycRI}scsyi}i}i_i_ i_i_i_id_id|d|i_ i Wnt j onXdS(NRGRR( RSRRRRRRTRR8RRRH(RR( RJRKRLRMRHRRRNRORP(s gwidgets.pycRQs  RsY-axis OptionsRRRs Bottom ValueRR>RR&i Rs Top ValueRRisMajor TickmarksR2isMinor TickmarkssDecimal placesiR[RsMajor GridlinessMinor GridlinessGridline Colors RGR(RRR]R R RRR7RRRRRRRRReRRRR(RRRIRQRSRT(( RKRJRMRPRRNRHRORRLs gwidgets.pycRV|s *!993999--$ c Cs|idt|i}t|i}|i|i|i||i|i|i}|i|i|i ||i |i |i }|i |i dddtidtid||ddd ddS( NRiiRRt RNiR(RR>RNRRRR'R*RRR&R$RR&RRRtjoiner(RRtxpointtypointRNR((s gwidgets.pycRs  00tGenericcKs#|it||d||dS(NRy(t add_seriestzip(RRRRyR((s gwidgets.pyct add_series_xyscKs|iddoid|jp d|joO|ii\}}d|jo||d(RR/RRt filter_frametpathst has_extensiont ext_belowt nohyphensRtupdatet extensiontfiltert beginningt scroll_listt list_frameR"Rtdoubleclick_eventt doubleclickt dir_errort make_listtpack_up(RRRst width_filet width_extt width_listt height_listtdef_exttdef_fileRtRuRPRRvR~((s gwidgets.pycRs.      @7OB!    cCs|idS(N(R~(RR((s gwidgets.pycR}@scCs:g}|iiD]}||ii|q~}|S(N(R"RRRS(RRMRNt selections((s gwidgets.pyctget_selectionsDs6cCs|id|tS(Nt begin_string(RwR](Rtnew((s gwidgets.pycRyIscCs|iidddddti|ioV|io&|iidddddtiq|iidddddtin|iidddti|iidddti ti dS(NR'iR(R)i( RzR5RR7RtRuRxRrR|tNWtSE(R((s gwidgets.pycRMs"  &&cCscg|_d|_xJ|iD]?}tii|o|iti||_qd|_qWdS(Nii(tfilelistRRstostpathtexiststdircachetlistdir(Rt directory((s gwidgets.pycRZs   cCs|iidtidS(Ni(R"RRRE(R((s gwidgets.pyct delete_allfscCs|iiti|dS(N(R"RDRRE(RRO((s gwidgets.pycRDiscCs,|io|i|n|i|dS(N(Rvtupdate_no_hyphenstupdate_with_hyphens(RR((s gwidgets.pycRwls cCs|tjo|ii}ny|i}Wn d}nX|io|iii}nd}|iidti x|i D]}|i}|djo'|djo|ii ti |q|djo.|i |o|ii ti |qq|djo.|i |o|ii ti |qq|i |o*|i |o|ii ti |qqWdS(NRQi(RRzRStlowerRtRxR"RRRERRDt startswithtendswith(RRtbegin_string_lowt end_stringROtitem_low((s gwidgets.pycRts.        cCs|tjo|ii}ny|iidd}Wn d}nX|io%|iiiidd}nd}|iidt i x |i D]}|iidd}|djo'|djo|ii t i |q|djo.|i |o|ii t i |qq|djo.|i|o|ii t i |qq|i|o*|i |o|ii t i |qqWdS(Nt-RQi(RRzRSRtreplaceRtRxR"RRRERRDRR(RRRRROR((s gwidgets.pycRs.   %    (RRR]RtEXTENDEDRRR}RRyRRRRDRwRR(((s gwidgets.pycRks3+       t file_pickercBseZRS((RR(((s gwidgets.pycRst ScrollListcBs#eZeieidddZRS(ii c Cstii||||_ti|dti|_ti|d|d|iid|d||_ |ii d|i i |ii d|dti |i i d|dtid tdS( NR*RPR,R&R%RRRtexpand(RR/RRR:R?t scrollbarR RR"R>R@RtYtBOTHR](RRt scrollsideRPR&R%((s gwidgets.pycRs 0(RRRRRUR(((s gwidgets.pycRsR{cBseZRS((RR(((s gwidgets.pycR{st ScrollingTextcBs)eZdZdeedddZRS(cCs.tt|ot|i|SntdS(N(RRR!RR(RR#((s gwidgets.pycR$sRQidic Kstii||d|joti|dRR?R@RARDRERBRC(RRIRR=RAR&R%RL((s gwidgets.pycRs" 7'1'3 (RRR$R]R(((s gwidgets.pycRs tComboboxcBsDeZdZdeddddZdZdZdZRS(cCsXtti|ot|i|Sn.tti|ot|i|SntdS(N(RRR R!R"tEntryRR(RR#((s gwidgets.pycR$s c Ks||_tii|||o |}n|}t|||_|ii|_|p h}nd|jo t|iid|dt nonnegfloatRRpRysRRRR(RIRR/RRt ezlistboxR"R2RTRt entry_intRt entry_floattentry_nonnegfloattentry_nonnegintt entry_customRtselection_commandRRR R7tXR]( RRIt entry_argsRRRqtpopupRLtezframe((s gwidgets.pycRsH             .cCs |iiS(N(RRS(R((s gwidgets.pycRS$scCst|ttfotid|}n|iid}|iidti |ii dti |ii ti ||iid|dS(Ns, R|i( RlR.R/RRYRRTRRR~RRERD(Rtastringt old_state((s gwidgets.pycR'scGs|i|iidS(N(RRRZ(RR((s gwidgets.pycR0sN( RRR$RRRRSRR(((s gwidgets.pycRs  2  R cBsAeZdZddZdZdZdZdZRS(cCstti|ot|i|SnUtti|ot|i|Sn.tti|ot|i|Snt dS(N( RRR R!R"RRRRR(RR#((s gwidgets.pycR$9sc Ksti|_|iiti||d|i||iitti|ddd|i dddd|_ |i i |i i dtid tid tid t|i i dtid tiddd ddddS( NRRtvRRiRRRRRtipady(RtToplevelRtwithdrawRRtoverrideredirectR]Rt drop_it_downRRt pack_forgetRRR8R(RRIRnRL((s gwidgets.pycRHs  - .c Cs|iiddjodSnyP|iit|iidjo|iiin|iiiWnt j onXyt|iid}g}|ii dt i D]*}t t||jo |tqq~}|o|iiin|iiiWnt j onX|ii}|ii}|ii}||}tidd||} |i} || dj} |iidd|ii| |ii|ii} || | jo=| o6|| }tidd||} |ii| n|ii|i|ii|iid |i d|_!|iid |i"|iid |i#|iid |i dS( NRt^R%R&it+RQis sss($RRTR"RR2RRAR5t grid_removeRRSRRER0R4R]R=Rt winfo_heightt winfo_rootxt winfo_rootyRRYtwinfo_screenheightR>Rtgeometryt deiconifyt transientRIRTRtrollupt time_delay_idttime_delay_rollupttime_delay_cancel( RR&RMROtflaggedt entry_heighttentry_xtentry_ytmytoptmygeot screen_bottomt below_halfwaytmyheight((s gwidgets.pycRZsL(P      cGs+|io|i|id|_ndS(Ni(Rt after_cancel(RR((s gwidgets.pycRs cGs*|ip|id|i|_ndS(Ni(RtafterR(RR((s gwidgets.pycRs cGsA|iiy|iiddWntij onXdS(NRR(RRRR>RtTclError(RR((s gwidgets.pycRs  N( RRR$RRRRRR(((s gwidgets.pycR 4s    /  t HelpWindowc Bs)eZddddddeedZRS(tinfoRQidis Help Windowc Cstii||||_|i|t|d|d|d||_|o|iiidti nti |ddd|i |_ |ii dtidtd ti|i i dti|o+|ptiid o|i|n|ii|_dS( NRR&R%R|tCloseRRRRtwin(RRRRRRt text_frameRR>RRRtcloseRR R]RRtsystplatformRt iconbitmap( RRRIR&R%Rticont iconforcetdisabled((s gwidgets.pycRs   !!%!N(RRRRR]R(((s gwidgets.pycRsRc Bs}eZdd eeeed eed ZdZdZdZedZ dZ dZ edZ ed Z RS( s modal windowc Ostii|| | ti|dddddddgt|djo|ptii d|_ ||_ g|_ g|_ |i||id |idS( NRRRRt user_canceltcentertcenter_of_widgetRtWM_DELETE_WINDOW(RRRRR}R~RRRRtdo_icont parent_windowt widget_listtwidget_show_argsRt wm_protocoltcancel( RRIRRRRRRRRRtposargstkwargs((s gwidgets.pycRs+)    cCs&|io|in|idS(N(RR(R((s gwidgets.pycRs cCs&|io|in|idS(N(RR(R((s gwidgets.pyctaccepts cKs$|ii||ii||S(N(RR R(RRR((s gwidgets.pycR scsfd}fd}iip|\}}n(tittfoi\}}nid jogi}|d jo;ip!|dd|d d}}q|\}}ql|\}}ny_iiii}}i o2|ii d }|ii d }nWn"t j o|\}}nX|||}i |iii|oiniidS( Ncs^io>td|id}td|id}ntidd||S(NiiRRQ(RR3t winfo_widthRRRY(RNR(R(s gwidgets.pyctmake_geom_strings !csdii}ii}io2|iid}|iid}n||fS(Ni(Rtwinfo_xtwinfo_yRRR(RNR(R(s gwidgets.pyctget_geo_from_parents  tmousetMOUSEtMouseiii(ii(smousesMOUSEsMouse(ii(tupdate_idletasksRRlR/R.RRRRRRRRRRRRTtgrab_sett wait_window(RRRRtmy_xtmy_yRR((Rs gwidgets.pyctdisplays8     !   cCs|io|iti|dti|_|iti|iddd|idti|_ |iti|iddd|i dti |_ nx8t t|iD]!}|i|i|i|qWdS(NRRtAcceptRRtCancel(RR RR/Rt gwacframeRRRtgwaccept_buttonRRtgwcancel_buttonR;R0RRR(RRN((s gwidgets.pycR2s $6:c Csx8tt|iD]!}|i|i|i|qW|io|i\}}ti||_ ti |i ddd|i |_ ti |i ddd|i |_|i id|ddd|d titi|i id ti|iid tindS( NRRRRR'R(it columnspanR)R(R;R0RR5RRt grid_sizeRR/RRRR RR R7R6RRR(RRNR'RA((s gwidgets.pycR5:s $$/cCs<|i|io|i|in|id|dS(NR(RRRRR(RR((s gwidgets.pycRFs  cCs<|i|io|i|in|id|dS(NR(R5RRRR(RR((s gwidgets.pyctgrid_and_displayMs  N(RRRRR]RRRR RRR5RR (((s gwidgets.pycRs$    =  RcBseZRS((RR(((s gwidgets.pycRTst BusySignalcBsAeZdddddZdZdZdZdZRS( idii ic Cstii||ddddddddd d d d g |_|it||_|ii|_||_ ||_ ||_ ti |d |i d|i dd|_ |i i|d|df|_tidddddd|_|i i|iddddd|i|_|id|i |id|i f|_|i i|idd|_d|_dt||_|idS(NRRRRRRtgoldRRs dark greenRRR%R&RGRiRRRi R.RRRtBUSYRiiiP(RRRtcolorsRR]Rtwinfo_topleveltparent_toplevelR&R%tdiameterRRRRRRRRRtupleftRt ball_coordstballtstepR>ttimestepR(RRIR%R&Rtframes((s gwidgets.pycRYs$ -     * !-+! cCs|it|}t|i}|d|dd|dd}|d|dd|dd}t||d|d|||i|i|i|_|i|i|i dS(Niiii( Rt get_geometryRt set_geometryRt focus_gett focus_widgetRTRR(RRtrootgeot left_edgettop_edge((s gwidgets.pycRws  ""  cseiiiddi_fd}|_|_tid|d|d|}|i t |i i x6|i o(tiiiiqWioiiniiiiiiididididfiiidd iidS( NRRcsEtii ii}t|djo|d}n|S(Nii(trandomtuniformRRR:(R(R(s gwidgets.pyctget_moves ttargetRRi i sDONE!(RR RRRtxmovetymovet threadingtThreadt setDaemonR]RRtisAlivettimetsleepRt move_ballRwRRTRt grab_releaseRRR&R%R(RtfunctionRRR$t other_thread((Rs gwidgets.pyct i_am_busys,           > cCs:|id|id|id|i|id|ifS(Nii(RR(R((s gwidgets.pycRscCso|id|i|id|if|_|i}|ddjp|d|ijoj|i |_|idd|i|idf|_|i}|ii|idti |i n|ddjp|d|i joj|i |_|id|idd|if|_|i}|ii|idti |i n|ii |i|dS(NiiiRi( RR&R'RR&RR RR"tchoiceRR%R(Rt new_coords((s gwidgets.pycR.s+ % ( )% ( )(RRRRR2RR.(((s gwidgets.pycRXs   + t CustomEntrycBseZdddZRS(tPRQc OsL|i||_tii||ddd|idt|||dS(Ntvalidatetkeytvalidatecommands %(tregisterR7RRRR4(RRItvalidate_optionRyRR((s gwidgets.pycRs(RRR(((s gwidgets.pycR5sRcBseZRS((RR(((s gwidgets.pycRstIntEntrycBseZdZdZRS(c OsE|i|i|_tii||ddd|id||dS(NR7R8R9s %P(R:RyR7RRR(RRIRR((s gwidgets.pycRscCsTt}yt|}t}Wn1|djo|djo t}qPt}nX|S(NRQR(RR2R](RRRttest((s gwidgets.pycRy s    (RRRRy(((s gwidgets.pycR<s RcBseZRS((RR(((s gwidgets.pycR stNonNegIntEntrycBseZdZdZRS(c OsE|i|i|_tii||ddd|id||dS(NR7R8R9s %P(R:RyR7RRR(RRIRR((s gwidgets.pycR scCs^t}y-t|}|djo t}nt}Wn$|djo t}qZt}nX|S(NiRQ(RR2R](RRRR=((s gwidgets.pycRy s       (RRRRy(((s gwidgets.pycR> s RcBseZRS((RR(((s gwidgets.pycR( st FloatEntrycBseZdZdZRS(c OsE|i|i|_tii||ddd|id||dS(NR7R8R9s %P(R:RyR7RRR(RRIRR((s gwidgets.pycR- scCsat}yt|}t}Wn>|djo$|djo|djo t}q]t}nX|S(NRQRR>(RR>R](RRRR=((s gwidgets.pycRy5 s  '  (RRRRy(((s gwidgets.pycR?, s RcBseZRS((RR(((s gwidgets.pycRA stNonNegFloatEntrycBseZdZdZRS(c OsE|i|i|_tii||ddd|id||dS(NR7R8R9s %P(R:RyR7RRR(RRIRR((s gwidgets.pycRF scCsTt}yt|}t}Wn1|djo|djo t}qPt}nX|S(NRQR>(RR>R](RRRR=((s gwidgets.pycRyN s    (RRRRy(((s gwidgets.pycR@E s RcBseZRS((RR(((s gwidgets.pycRZ sR cBseZdheid<eidRRRpiRytshowRQscsS(((R(R(s gwidgets.pyct sRRRR(RR/RRRRRYRRRRRRRR0RRR>RRRRRbRjRR6RRRRR7(RRRRRlRR&RnRRRtbutton_pack_argstentry_pack_argsRqRot entry_textRC((Rs gwidgets.pycR{ sd   % % % % (+$    cCsy|ii}Wnttj oh|idjod}|i|q|idjod}|i|qd}|i|nX|S(NR>gR2iRQ(RYRSRHRR(RR((s gwidgets.pycRS scCs|ii|dS(N(RYR(RR((s gwidgets.pycR sN( RRRRRR6RR7R]RRSR(((s gwidgets.pycR ^ s~= RcBseZRS((RR(((s gwidgets.pycR scCsdit|t|gS(NR>(RCR4(R'R(((s gwidgets.pyctmake_text_index scCst|iddS(NR>i(R2R?(RG((s gwidgets.pyct get_text_row scCst|iddS(NR>i(R2R?(RG((s gwidgets.pyctget_text_column scCsO|i}d}x6|t|jo"|||i}|d}qW|S(Nii(twinfo_childrenR0(RtchildrenRN((s gwidgets.pyctget_all_my_widgets s cCsCt|}x0tt|D]}|i}|iqWdS(N(RMRR0RR(RRLRN((s gwidgets.pyctdestroy_all_my_widgets s   cCsx|D]w}||}t|ttfot||i|RR(tclobjecttvarlistt local_dictR8R((s gwidgets.pyctparams_to_tk_attributes s cCst|iS(N(tgeostring_to_valstwinfo_geometry(R((s gwidgets.pycR5 scCs |it||||dS(N(t wm_geometrytvals_to_geostring(RR&R%RNR((s gwidgets.pycR9 scCs|idd}|idd}|id\}}}|id\}}t|}t|}t|}t|}||||fS(NRs+-s++RRN(RR?R2(RtwhRNRR&R%((s gwidgets.pycRU= s    cCsOtid||dd}tid|||dd}|idd}|S(NRNRNiRs+-R(RRYR(R&R%RNRRtbstring((s gwidgets.pycRXK scCsdi|i}|S(Nt_(RCR?(RR"((s gwidgets.pycRR st__main__cCs dGHdS(NsHello!((((s gwidgets.pyctbutton_routine_ sRRGRlsHowdy!RR&i RR2RiRttestparmcBseZdddZRS(itinkcCsPdddg}t||t|iiGH|iiGH|iiGHdS(Ntbobbytjoetsue(RTR~R`RSRaRb(RR`RaRbRR((s gwidgets.pycRf s (RRR(((s gwidgets.pycR^e sg?([tTkinterRRtos.pathRRRtgiepyRRttkColorChooserRRRR"R,R(RARIRRRRRRRR/RRhR^R}R{RRRRRRRRZRRbReRcRoRRkRRR{RRR RRRRRRR5RR<RR>RR?RR@RR RRHRIRJRMRNRTRRRURXRRR]trootRtframeRR^tatesttmainloop(((s gwidgets.pycss             WV q+ $Qin'l     K       0