ó Afc@sxddlZddlmZdd„Zd„Zd„Zd„Zd„Zd„Zd „Z d „Z ej e ƒdS( i’’’’N(tpanelcCs|dkrt}n|jƒS(N(tNonetstdscrtgetch(twin((s+/usr/lib64/python2.7/Demo/curses/ncurses.pytwGetchar s cCs tƒdS(N(R(((s+/usr/lib64/python2.7/Demo/curses/ncurses.pytGetcharscCs'tdkrtƒn tjtƒdS(Ni(tnap_msecRtcursestnapms(((s+/usr/lib64/python2.7/Demo/curses/ncurses.pyt wait_a_whiles  cCs2tjtjddƒtjƒtj|ƒdS(Nii(RtmoveRtLINEStclrtoeoltaddstr(ttext((s+/usr/lib64/python2.7/Demo/curses/ncurses.pytsaywhats c CsÆtj||||ƒ}tj|ƒ}tjƒr’|tjkrNtj}n tj}|}tj|||ƒ|j t dƒtj |ƒƒn|j t dƒtj ƒ|S(Nt ( RtnewwinRt new_panelt has_colorst COLOR_BLUEt COLOR_WHITEt COLOR_BLACKt init_pairtbkgdsettordt color_pairtA_BOLD( tcolortrowstcolsttlyttlxRtpantfgtbg((s+/usr/lib64/python2.7/Demo/curses/ncurses.pytmkpanel s   "cCstjƒtjƒdS(N(Rt update_panelsRtdoupdate(((s+/usr/lib64/python2.7/Demo/curses/ncurses.pytpflush0s cCsĄ|jƒ}|jƒd}|jddƒ|jd|ƒ|jƒ|jƒ|jƒ\}}xVtd|dƒD]A}x8td|dƒD]#}|j||ƒ|j|ƒq‘WqwWdS(Nis-pan%c-i( twindowtuserptrR RR tboxtgetmaxyxtrangetaddch(R"Rtnumtmaxytmaxxtytx((s+/usr/lib64/python2.7/Demo/curses/ncurses.pyt fill_panel4s   c Cs6|adaddddddgatjƒxTtdtjdƒD]<}x3tdtjƒD]}tjd ||d ƒq^WqEWxŖtddƒD]™}t tj tjd d tjd dddƒ}|j d ƒt tj tjd dtjdtjdtjd ƒ}|j dƒt tj tjdtjd tjd tjdƒ}|j dƒt tjtjd d tjd tjd d tjdƒ}|j dƒt tjtjd d tjd tjd tjd d ƒ}|j dƒt|ƒt|ƒt|ƒt|ƒt|ƒ|jƒ|jƒtƒtdƒtƒtdƒ|jddƒ|jƒ|jƒ|jƒ|jƒ|jƒtƒtƒtdƒ|jƒtƒtƒtdƒ|jƒtƒtƒtdƒ|jtjddtjd ƒtƒtƒtdƒ|jƒtƒtƒtdƒ|jtjddtjdƒtƒtƒtdƒ|jƒtƒtƒtdƒ|jƒtƒtƒtd ƒ|jƒtƒtƒtd!ƒ|jƒtƒtƒtd"ƒ|jƒtƒtƒtd#ƒ|jƒtƒtƒtd!ƒ|jƒtƒtƒtd$ƒ|jƒtƒtƒxDtdd%ƒD]3}|jƒ} |jƒ} td&ƒ| jtjd dƒ| jt|ƒ|jtjd%|tjd ƒ| jtjd%dƒ| jt|ƒtƒtƒtd'ƒ| jtjd%dƒ| jt|ƒ|jtjdd|d d%ƒ| jtjd dƒ| jt|ƒtƒtƒqÆWtd&ƒ|jtjd%|dtjd ƒtƒtƒtd(ƒ|jƒtƒtƒtd#ƒ|jƒtƒtƒtd"ƒ|jƒtƒtƒtd)ƒ~tƒtƒtd*ƒ|jƒtƒtƒtd+ƒ~tƒtƒtd,ƒ~tƒtƒtd-ƒ~tƒtƒtdkr(Pnd.aq•WdS(/NittesttTESTs(**)s*()*s<-->tLASTis%di iitp1iitp2i tp3itp4tp5spress any key to continues(h3 s1 s2 s4 s5;press any key to continuess1; press any key to continuess2; press any key to continuesm2; press any key to continuess3; press any key to continuesm3; press any key to continueisb3; press any key to continuess4; press any key to continuess5; press any key to continuest3; press any key to continuest1; press any key to continuest2; press any key to continuest4; press any key to continueism4; press any key to continuesm5; press any key to continuest5; press any key to continuesd2; press any key to continuesh3; press any key to continuesd1; press any key to continuesd4; press any key to continuesd5; press any key to continueid(RRtmodtrefreshR-RR tCOLSRR%t COLOR_REDt set_userptrt COLOR_GREENt COLOR_YELLOWRt COLOR_MAGENTAR4thideR(RR R tshowtbottomttopR)( RR2R3R8R9R:R;R<titmptw4tw5((s+/usr/lib64/python2.7/Demo/curses/ncurses.pyt demo_panelsCsN !                                      "   "                   " #  &             ( RRRRRR RR%R(R4RLtwrapper(((s+/usr/lib64/python2.7/Demo/curses/ncurses.pyts         Ī