ó {fc@sddlZddlZddlZddlZddlZddlTddlZddlZddlZddl m Z ddl m Z ddl m Z ddl mZddl mZddl mZdd lmZdd l mZmZmZdd l mZdd l mZd ZdejƒZd„Zed„Zdefd„ƒYZeƒZ defd„ƒYZ!d„Z"d„Z#ddl$Z$e$Z%[$defd„ƒYZ&d„Z'idd6dd6dd6Z(d „Z)d!„Z*d"„Z+e,d#krdd$l-m.Z.e.e+ƒndS(%iÿÿÿÿN(t*(tMultiCallCreator(t WindowList(t SearchDialog(t GrepDialog(t ReplaceDialog(tPyParse(tidleConf(t aboutDialogttextViewt configDialog(t macosxSupport(thelpis (%s)cCs�tj\}}}}}d||f}|rB|d|f7}n|dkrb|d|f7}n'|dkr‰|d|d|f7}n|S(sYFormat sys.version_info to produce the Sphinx version string used to install the chm docss%s%ss%st candidatesrc%stfinali(tsyst version_info(tmajortminortmicrotleveltserialtrelease((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt_sphinx_versions  c CsSd}x«|jdƒD]š}|dk r5|jƒntj||ƒ\}}}|dtjkrgPntj||||ƒ}y |j}Wqtk r¯t d|j ‚qXqW|dtjkrFt |ƒ}y |j }Wntk róqFXd}t jj|ƒ\}} | dkr'd} n|| }|dtjf}n|||fS(sCVersion of imp.find_module() that handles hierarchical module namest.isNo source for module s.pycs.pyN(tNonetsplittclosetimpt find_modulet PY_SOURCEt load_modulet__path__tAttributeErrort ImportErrort__name__t __import__t__file__tostpathtsplitext( tfullnameR'tfilettgttfilenametdescrtmoduletmtbasetext((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt _find_module's2          t HelpDialogcBs;eZd„Zdd„Zd„Zd„Zdd„ZRS(cCsd|_d|_dS(N(Rtparenttdlg(tself((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt__init__Js cCs[ddl}|jdtddƒ|jdkrA|j|ƒn|rW|j|ƒndS(sä Display the help dialog. parent - parent widget for the help window near - a Toplevel widget (e.g. EditorWindow or PyShell) to use as a reference for placing the help window iÿÿÿÿNs‡EditorWindow.HelpDialog is no longer used by Idle. It will be removed in 3.6 or later. It has been replaced by private help.HelpWindow t stackleveli(twarningstwarntDeprecationWarningR5Rt show_dialogt nearwindow(R6R4tneartw((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytdisplayNs   cCsr||_tjjtjjtjjtƒƒdƒ}tj|d|dt ƒ|_ }|j d|j dƒdS(Nshelp.txttHelptmodals t+( R4R&R'tjointabspathtdirnameR%R t view_filetFalseR5tbindtdestroy(R6R4tfnR5((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR<`s -"cCs\|j}|jƒd|jƒdf}|jƒ|jd|ƒ|jƒ|jƒdS(Ni s=+%d+%d(R5t winfo_rootxt winfo_rootytwithdrawtgeometryt deiconifytlift(R6R>R5tgeom((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR=fs     cCsd|_d|_dS(N(RR5R4(R6tev((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRJqs N(R#t __module__R7RR@R<R=RJ(((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR3Hs     t EditorWindowcBskeZddlmZddlmZddlmZddlm Z m Z m Z ddl m Z ddlmZddlmZd{Zd{d{d{d{d„Zd „Zd „Zd „Zd „Zd{d „Zd|d}d~dd€d�d‚gZd„Zd„Zd{Zd„ZdƒgZd!„Z d"„Z!d#„Z"d$„Z#d{d%„Z$d{d&„Z%d{d'„Z&d{d(„Z'd)„Z(d*„Z)d+„Z*d{d,„Z+d{d-„Z,d.„Z-d/„Z.d0„Z/d1„Z0d2„Z1d3„Z2d4„Z3d5„Z4d6„Z5d{d7„Z6d{d8„Z7d{d9„Z8d:„Z9d;„Z:d<„Z;d=„Z<d>„Z=d?„Z>d@„Z?dA„Z@dB„ZAdC„ZBdD„ZCdE„ZDdF„ZEdG„ZFd{dH„ZGdI„ZHdJ„ZIdK„ZJdL„ZKdM„ZLdN„ZMdO„ZNdP„ZOdQdR„ZPdS„ZQdQdT„ZRdU„ZSdV„ZTdW„ZUdX„ZVdY„ZWdZ„ZXd[„ZYd\„ZZd]„Z[d^„Z\d{d_„Z]d{d{d`„Z^da„Z_d{db„Z`d{dc„Zadd„Zbde„Zcdf„Zddg„Zeefdh„Zgdi„Zhdj„Zidk„Zjdl„Zkdm„Zldn„Zmdo„Zndp„Zodq„Zpdr„Zqds„Zrdt„Zsdu„Ztdv„Zudw„Zvdx„Zwdy„Zxdz„ZyRS(„iÿÿÿÿ(t Percolator(tColorDelegator(t UndoDelegator(t IOBindingtfilesystemencodingtencoding(tBindings(tToplevel(tMultiStatusBarcCsª tjdkrvtjjtjddƒ}tjj dƒr�ddtj d }tjj dƒrld}q d }tjj||ddƒ}n}tjd d krãtjjtjdd t ƒƒ}tjj |ƒr |}q n*tjd kr tjjtjd ƒ}ntjj|ƒ}tjj |ƒr_|t_tjd krsdtjt_qsqvdtj d t_n||_|p‹|j}||_y tjWntk r¾dt_nXt|ƒ|_tj|d|jƒ|_} |r|j|_|j|j_ni|_i|j_tjjtjƒdƒ|_t| ƒ|_ } t!| ddƒ|_"} tj#dddddƒ|_$idd6dd6dd6d d!6|j$d6tj#ddd"ddƒd"6} t%d#krïd$| d%ƒ| j.d9|j?ƒ| j.d:|j@ƒ| j.d;|jAƒ| j.d<|jBƒ| j.d=|jCƒ| j.d>|jDƒ| j.d?|jEƒ| j.d@|jFƒ| j.dA|jGƒ| j.dB|jHƒ| j.dC|jIƒ| j.dD|jJƒ| j.dE|jKƒ| j.dF|jLƒ| j.dG|jMƒ| j.dH|jNƒ| j.dI|jOd ƒƒ| j.dJ|jOdKƒƒ| j.dL|jPƒ| j.dM|jQƒ| j.dN|jRƒ|rÂ||j|<|rp||jS|>> tmenusrecent-files.lsttnametvbartmainRUtwidthttypetintttextitpadxtnonetwrapithighlightthicknesstheightg!@t wordprocessorttabstyletWM_DELETE_WINDOWs<>ss<2>s<3>s<>s<>s <>s<>s<>s<>s<>s<>s<>s<>cSsdS(Ntbreak((tevent((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytßts<>s<>s<>s<>s<>s<>s <>s <>s<>s<>s<>s<>s<>s<>s<>s<>s<>s<>s<>ssis<>s<>s<>s<>s<>s<>s<>tcommandtsidetfilltyscrollcommandtfonttexpandtIndents use-spacestboolii2iôi@KLttearoffR*tlabels Recent Filest underlinetwindowstendiÿÿÿÿ(i2iôi@KL(ŽRUthelp_urlRR&R'RDRtprefixtplatformtcountRtisdirRtisfiletnormpathtflisttroottps1R!tMenutmenubarRtListedToplevelttoptvarst tkinter_varst inversedictt instance_dictRt GetUserCfgDirtrecent_files_pathtFramet text_framet ScrollbarRet GetOptionRgt TkVersionRtTextRjtfocused_widgett createmenubartapply_bindingstprotocolRRIt close_eventR tisAquaTktright_menu_eventtcuttcopytpastetcenter_insert_eventt help_dialogt python_docst about_dialogt config_dialogt open_modulet select_alltremove_selectiont find_eventtfind_again_eventtfind_in_files_eventtfind_selection_eventt replace_eventtgoto_line_eventtsmart_backspace_eventtnewline_and_indent_eventtsmart_indent_eventtindent_region_eventtdedent_region_eventtcomment_region_eventtuncomment_region_eventttabify_region_eventtuntabify_region_eventttoggle_tabs_eventtchange_indentwidth_eventtmove_at_edge_if_selectiont del_word_lefttdel_word_rightt home_callbacktdictt new_callbacktclose_all_callbacktopen_class_browsertopen_path_browsertset_status_bartyviewtpacktRIGHTtYtsettGetFonttLEFTtBOTHtTOPt focus_settusetabsttabwidtht indentwidthtset_notabs_indentwidthRHtcontext_use_ps1tnum_context_linesRVtperRXtundot insertfiltertundo_block_starttundo_block_stoptset_saved_change_hooktsaved_change_hookRYtiotset_filename_change_hooktfilename_change_hooktrecent_files_menutmenudicttinsert_cascadetupdate_recent_files_listtcolortexiststloadfilet set_filenametResetColorizertset_indentation_paramstispythonsourcetload_extensionstgettindext add_separatort wmenu_endtregister_callbacktpostwindowsmenut tkMessageBoxtaskyesnottkSimpleDialogt askintegert showerror(R6R‹R,tkeyRŒtdochometpyvertbasepathtchmfileR‘R™Ret text_optionsRjt usespacesRÛRÜRâRcRƒ((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR7ƒs4                                    %           cCsxt|tƒs| r|Sy|j|jƒSWnCtk rsy|j|jƒSWqttk ro|jdƒSXnXdS(s8convert filename to unicode in order to display it in Tks iso8859-1N(t isinstancetunicodetdecodeRZtUnicodeDecodeErrorR[(R6R,((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt_filename_to_unicode_s  cCs)|jjƒ\}}|jj|ƒdS(NRs(RâtdefaultfilenameR‹tnew(R6RtRFtbasename((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÆnscCs||jd@dkr&|jdkr&dS|jjdƒr�|jjdddƒr�|jjdddƒr�t|jjdƒjdƒd ƒ}nR|jjddƒ}x:tt |ƒƒD]}||dkr¸Pq¸q¸Wt |ƒ}t|jjd ƒjdƒd ƒ}||krd}nd t |ƒd}|jd @dkr\|jj dddƒnù|jjdƒs„|jj dd ƒnY|jj|jjdƒd|jjd ƒƒrÊ|jj ddƒn|jj ddƒ|jj|ƒ}|jjdƒ}|jj|d|ƒr)||}}n|jj dddƒ|jj d||ƒ|jj d |ƒ|jjd ƒdS(NiitHometiomarks<=sinsert lineendsinsert linestartRit s tinsertsinsert linestart+tctsels1.0Rƒs sel.firstt my_anchortRs(R s (tstatetkeysymRjRòtcompareRiRRñtxrangetlentstrt tag_removetmark_setttag_addtsee(R6Rttinsertpttlinetlineattdesttfirsttlast((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÄss>"( %  0cCs|j|jƒ|_t|jddddddƒ}tjdkra|jjddd tƒn|jjd d d tƒ|jjd d d tƒ|jjd t dt ƒ|jd t dt ƒ|j j d|j ƒ|j jdddƒ|j j|j ƒdS(NRoit borderwidtht backgroundtgrey75Rbt _padding1s RxtcolumnsCol: ?RsLn: ?Rys<>s s(R^R‘t status_barR˜RR†t set_labelRÍRÌtBOTTOMtXRjRItset_line_and_columnt event_addt after_idle(R6tsep((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÊœs!  cCsS|jjtƒjdƒ\}}|jjdd|ƒ|jjdd|ƒdS(NRR(sCol: %sRsLn: %s(RjRòtINSERTRR)R*(R6RtRR(((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR-¬s!R*t_Fileteditt_EdittformattF_ormattrunt_Runtoptionst_OptionsR‚t_WindowR t_HelpcCsô|j}i|_}xe|jD]Z\}}t|ƒ\}}t|d|ddƒ||<}|jd|d|d|ƒq WtjƒrÃt|ddddƒ|d<}|jdd d|ƒn|jƒ|jd j t ƒ|_ |j ƒdS( NRdRiR€RcR�tapplet applicationtIDLER ( R�Ræt menu_specstprepstrRŽt add_cascadeR t isCarbonTkt fill_menusRòtENDtbase_helpmenu_lengthtreset_help_menu_entries(R6tmbarRæRdR€R�Rc((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRŸ¼s      cCsk|jd}|jdƒ}|dkr1d}n||jkrZ|j|jd|ƒntj|ƒdS(NR‚Rƒiÿÿÿÿi(RæRòRRôtdeleteRtadd_windows_to_menu(R6RcRƒ((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRöÎs   c Cs%|jjdd|j|jfƒ|js9|jƒn|j}||_tjd dk}|rz|jj ddƒnxr|j D]g}y|\}}}Wnt k r³q„nX|dkrÆq„nt ||ƒƒ}|j|d|ƒq„W|j|j|jƒ|r!|jj ddƒndS( NRs@%d,%diRatcursortarrowRtibeam(RjRtxtytrmenut make_rmenuRtRR†tconfigt rmenu_specst ValueErrorRtgetattrtentryconfigurettk_popuptx_rootty_root( R6RtRPtiswintitemR€t eventnamet verify_stateR((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¤Ús(#      tCloses<>cCsŒt|jddƒ}xg|jD]\}|d|d}}|dk rq|j|d„}|jd|d|ƒq|jƒqW||_dS(NRiicSs|j|ƒdS(N(tevent_generate(RjR\((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRwýsR€Rw(RŽRjRSRt add_commandRóRP(R6RPR[R€R\Rw((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRQøs cCs |jƒS(N(trmenu_check_copy(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytrmenu_check_cutscCs=y|jjdƒ}Wntk r*dSX|r5dSdSdS(Ns sel.firsttdisabledtnormal(RjRòtTclError(R6tindx((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRas  cCs=y |jjjd|jdƒWntk r4dSXdSdS(Nstk::GetSelectiont CLIPBOARDRcRd(RjttktcallRe(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytrmenu_check_pastes   cCstj|jdƒdS(sHandle Help 'About IDLE' event.s About IDLEN(Rt AboutDialogR‘(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR«scCstj|jdƒdS(s&Handle Options 'Configure IDLE' event.tSettingsN(R t ConfigDialogR‘(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¬scCs/|jr|j}n |j}tj|ƒdS(sHandle Help 'IDLE Help' event.N(RŒR‘R t show_idlehelp(R6RtR4((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR©!s   cCsytjd dkreytj|jƒWqutk ra}tjdddt|ƒd|j ƒquXnt j |jƒdS(NiRattitlesDocument Start FailuretmessageR4Rs( RR†R&t startfileR„t WindowsErrorR÷RûRRjt webbrowsertopen(R6Rttwhy((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRª*scCs|jjdƒdS(Ns<>Rs(RjR_(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¥5scCs*|jjdƒsdS|jjdƒdS(NRs<>Rs(Rjt tag_rangesR_(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¦9scCs$|jjdƒ|jjdƒdS(Ns <>RRs(RjR_R(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR§@scCs=|jjdddƒ|jjddƒ|jjdƒdS(NRs1.0send-1cRRs(RjRRR(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR®EscCs*|jjdddƒ|jjdƒdS(NRs1.0RƒR(RjRR(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¯Kscs:|jj‰|jj‰d‰‡‡‡‡fd†}|S(sèCursor move begins at start or end of selection When a left/right cursor key is pressed create and return to Tkinter a function which causes a cursor move from the associated edge of the selection. s sel.first+1cs sel.last-1ccsM|jd@dkrIyˆdƒˆdˆˆƒWqItk rEqIXndS(Niis sel.firstR(RRe(Rt(t edge_indext edges_tabletself_text_indextself_text_mark_set(s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt move_at_edgeZs   (s sel.first+1cs sel.last-1c(RjRòR(R6RwR{((RwRxRyRzs,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÁOs   cCs|jjdƒdS(Ns Rs(RjR_(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÂcscCs|jjdƒdS(NsRs(RjR_(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÃgscCstj|jƒdS(NRs(RtfindRj(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR°kscCstj|jƒdS(NRs(Rt find_againRj(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR±oscCstj|jƒdS(NRs(Rtfind_selectionRj(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR³sscCs tj|j|j|jƒdS(NRs(RtgrepRjRâR‹(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR²wscCstj|jƒdS(NRs(RtreplaceRj(R6Rt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR´{scCsp|j}tjddd|ƒ}|dkr1dS|dkrK|jƒdS|jdd|ƒ|jdƒdS(NtGotosGo to line number:R4RsiRs%d.0(RjRùRúRtbellRR(R6RtRjtlineno((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRµs     c CsPy|jjddƒ}Wntk r2d}n X|jƒ}tjddd|jd|ƒ}|ru|jƒ}n|sdSy"t|ƒ\}}\}}}Wn9ttfk rÜ}t j dt |ƒd|jƒdSX|t j kr t j d d |d|jƒdS|r |jƒn|jr<|jj|ƒn|jj|ƒ|S( Ns sel.firstssel.lastRvtModulesAEnter the name of a Python module to search on sys.path and open:R4t initialvalues Import errorsUnsupported types%s is not a source module(RjRñRetstripRùt askstringR2t NameErrorR"R÷RûRRRRR‹RtRâRë( R6RtRdtft file_pathtsuffixtmodetmtypetmsg((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR­‹s6    "   cCs |jj}|jjdko!|sC|jƒ}|dkrCdSntjj|ƒ\}}tjj |ƒ\}}ddl m }|j |j ||gƒdS(NtPyShellEditorWindowiÿÿÿÿ(t ClassBrowser( RâR,t __class__R#R­RR&R'RR(tidlelibR�R‹(R6RtR,theadttailR0R1R�((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRÈ­s   cCs$ddlm}|j|jƒdS(Niÿÿÿÿ(t PathBrowser(R’R•R‹(R6RtR•((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRɹscCsl|dk rh|dkrh|jjdd|ƒ|jjdddƒ|jjdddƒ|jƒndS(NiRs%d.0Rs1.0Rƒs insert +1l(RRjRRRtcenter(R6Rƒ((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytgotoline½s cCsº| stjj|ƒrtStjjtjj|ƒƒ\}}tjj|ƒdkr]tSy&t|ƒ}|jƒ}|j ƒWnt k r—t SX|j dƒo¹|j dƒdkS(Ns.pys.pyws#!tpythoni(s.pys.pyw(R&R'RˆtTrueR(R tnormcaseRttreadlineRtIOErrorRHt startswithR|(R6R,R0R1R‰R((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRïÄs$   cCs)|jr%|jj|ƒd|_ndS(N(R‹tunregister_maybe_terminateR(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt close_hookÒs cCs ||_dS(N(RŸ(R6RŸ((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytset_close_hook×scCsD|jr|jj|ƒn|jƒ|jj|ƒ|jƒdS(N(R‹tfilename_changed_editRáR‘tupdate_windowlist_registryRí(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRäÚs   cCs}|jr dS|j|jjƒr4|jƒ|_n|jry|jj|jƒ|jj|jƒ|jj|jƒndS(N( RéRïRâR,RWRÛt removefilterRÜRÝ(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt _addcolorizerás  cCs:|js dS|jjƒ|jj|jƒd|_dS(N(Rét removecolorsRÛR£R(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt _rmcolorizerìs   c CsÁ|jƒ|jƒtjƒ}tj|dƒ}tj|dddƒ}tj|dƒ}|jjd|dd|dd|d |dd |dƒtd kr½|jjd |dƒnd S(sUpdate the color themeRdRKtfgBgtfgthilitet foregroundR%tinsertbackgroundtselectforegroundtselectbackgroundg!@tinactiveselectbackgroundN(R¦R¤Rt CurrentThemet GetHighlightRjRRRœ(R6tthemet normal_colorst cursor_colort select_colors((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRíós          cCs#tj|jddƒ|jd|D]3}|j|dƒ}|j d|dd|ƒqhWn||jdRIRRñRR‚RÖRt expandtabsR×RÙRR�RRÞRRß( R6RtRjR"R#tcharsRÖthavetwanttlast_line_of_promptt ncharsdeleted((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¶²sH             c CsH|j}|jƒ\}}|jƒz|r||r|t|ƒt|ƒkrY|j|ƒS|j||ƒ|jd|ƒn|jddƒ}t||j ƒ\}}|t |ƒkrÏ|j ||j ƒnU|j rád}n3t |j|j ƒƒ}|j } d| || }|jd|ƒ|jdƒdSWd|jƒXdS(NRsinsert linestarts R Rs(RjR>RÞt index2lineR¹RIRRñt classifywsRÖRt reindent_toR×RÕRLRRRß( R6RtRjR"R#R…trawt effectivetpadRD((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR¸âs,        cCsõ|j}|jƒ\}}|jƒz±|rW|rW|j||ƒ|jd|ƒn|jddƒ}dt|ƒ}}x*||kr¨||dkr¨|d}qW||krÉ|jddƒdS|| }d}tj j dƒd} x:|r+|ddkr+|| kr+|d }|d}qòW|rI|jd |dƒnx&|jdƒdkrq|jdƒqLW|jddƒt |j dƒƒ} t j|j|jƒ} |js^x�|jD]‚} t| | dƒ} t| ƒd }|j|dƒ}| j|ƒ| j|j|j|ƒƒ}|dk s@| dkrÂPqÂqÂW| j|pWdƒnW|jd dƒ}|rƒ|d}nd }|j|dƒ}| j|ƒ| jdƒ| jƒ}|t jkrw|t jkrân‘|t jkr|jd|ƒno|t jkr)|j | j!ƒƒnJ|t j"krs| j#ƒdkr]|jd|ƒqs|j | j$ƒƒndS| j%ƒ}|jd|ƒ| j&ƒr¯|j'|ƒn"|rÑ| j(ƒrÑ|j)|ƒndSWd|j*dƒ|j+ƒXdS( NRsinsert linestartis is Rsiÿÿÿÿsinsert - %d charss.0tconsoles1.0(,RjR>RÞRIRRñRRRR�RRRRòRtParserR×RÖRÙRÚRRtset_strtfind_good_parse_startt_build_char_in_string_funcRtset_loR:tget_continuation_typetC_NONEtC_STRING_FIRST_LINEtC_STRING_NEXT_LINESt C_BRACKETRTtcompute_bracket_indentt C_BACKSLASHtget_num_lines_in_stmttcompute_backslash_indenttget_base_indent_stringtis_block_openerR¸tis_block_closerR¶RRß(R6RtRjR"R#RRìRDtindentRPtlnoROtcontexttstartatt startatindextrawtexttbodRÙR((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR·sˆ     %          cCs||jd„}|S(NcSs||d|ƒS(Ns+%dc((toffsett _startindext_icis((s,/usr/lib64/python2.7/idlelib/EditorWindow.pytinnerqs(R=(R6t startindexRt((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR\psc Cs¢|jƒ\}}}}xmtt|ƒƒD]Y}||}|r+t||jƒ\}} | |j} |j| ƒ||||RòRñR(R6RjR"R#R“R”RMRy((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRvÖs  cCs |j}dj|ƒ}||kr2|jƒdS|jdddƒ|jd|ƒ|jƒ|j||ƒ|j||ƒ|jƒ|j d|dƒdS(Ns Rs1.0RƒR( RjRDR‚RRRÞRIRRßR(R6R“R”RMRyRjtnewchars((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRxãs     cCs=|jr1t||jƒ\}}d|d|Sd|SdS(Ns R (RÕR}RÖ(R6RDR~R((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRwós cCsk|j}|jƒ|jdddƒr;|jddƒn|r]|jd|j|ƒƒn|jƒdS(Nsinsert linestarts!=R(RjRÞRRIRRwRß(R6R(Rj((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRTýs  c Cs.|jddd|jd|jddddƒS( Ns Tab widthsColumns per tab? (2-16)R4R…R‚iRƒi(RúRjR×(R6((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR|s  cCsrt|j|jƒjƒ\}}|r`|r`t||jƒ\}}t||jƒ\}}n d}}||S(Ni(tIndentSearcherRjRÖR7RS(R6topenertindentedRUt indentsmallt indentlarge((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRJs !  N(R*R2(R3R4(R5R6(R7R8(R9R:(R‚R;(R R<(R^s<>N(zR#RTtidlelib.PercolatorRVtidlelib.ColorDelegatorRWtidlelib.UndoDelegatorRXtidlelib.IOBindingRYRZR[R’R\tTkinterR]tidlelib.MultiStatusBarR^RR„R7RRÆRÄRÊR-R@RŸRöRPR¤RSRQRbRaRjR«R¬R©RªR¥R¦R§R®R¯RÁRÂRÃR°R±R³R²R´RµR­RÈRÉR—RïRŸR RäR¤R¦RíRµRÀRÌRØRGRÎRèRãRáRøRþRRõRöR¨R–RRRR¢RRRRðRRRºRR RDR5R7R-R=R>RBRIR™RîR¶R¸R·R\R¹RºR»R¼R½R¾R¿RÀRvRxRwRTR|RJ(((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRUxsæÜ   )                          "          $    ,                  %      0 # k      cCstt|ƒƒS(N(RiR(Rò((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRRscCstd}}x]|D]U}|dkr:|d}|d}q|dkre|d}||d|}qPqW||fS(NiR is ((tsRÖRURVtch((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRS&s       R…cBs;eZd„Zd„Zejejd d„Zd „ZRS( cCs6||_||_d|_|_d|_|_dS(Ni(RjRÖRìtfinishedRt blkopenlinet indentedline(R6RjRÖ((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR7>s  cCsd|jr dS|jd}|_t|ƒd}|jj|ddƒrMdS|jj||dƒS(NRvis.0s>=Rƒs lineend+1c(R’RìRRjRRñ(R6RìR((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR›Ds tclasstdeftfortifttrytwhilec Cs^|jr nN||kr0||kr0||_n*||krZ|jrZ||_d|_ndS(Ni(R’R“R”( R6RhttokentstartRƒRtINDENTtNAMEtOPENERS((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt tokeneaterMs   cCsmtj}|jt_z;ytj|j|jƒWntjtfk rNnXWd|t_X|j|j fS(N( t _tokenizettabsizeRÖttokenizeR›R t TokenErrort SyntaxErrorR“R”(R6t save_tabsize((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR7Ys   (R•R–R—R˜R™Rš( R#RTR7R›R¡R�RžR R7(((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyR…7s    cCs>|jdƒ}|dkr4|| ||d}n||fS(NR#ii(R|(R�Rì((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRAis t[t bracketleftt]t bracketrightt/tslashcCs |j|ƒ}| s7tjƒr;|dddhkr;dS|d}tjdd„|ƒ}tjdd „|ƒ}tjd d|ƒ}tjd d |ƒ}tjd d|ƒ}tjdd|ƒ}tjdd|ƒ}tjdd|ƒ}tjdd|ƒ}|S(Ns<>s <>s<>Rvis-[a-z]\bcSs|jƒjƒS(N(tgrouptupper(R/((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRu‚Rvs\b\w+\bcSstj|jƒ|jƒƒS(N(tkeynamesRñR­(R/((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyRuƒRvsKey-tCancels Ctrl-BreaksControl-sCtrl-R"RCs>>( R¶RtargvRR tsetupAppRURjRIR¢(R4RŒR,R3((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyt_editor_window—s  t__main__(R7(/RR&R†R RRŽRùR÷Rstidlelib.MultiCallRR’RRRRRtidlelib.configHandlerRRR R R R R@tpython_versionR÷RRR2tobjectR3t helpDialogRURRRSR£R¡R…RAR¯RÆR¶R¹R#tidlelib.idle_test.htestR7(((s,/usr/lib64/python2.7/idlelib/EditorWindow.pyts^          !- ÿÿÿÿÿ«  2