Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/idlelib/EditorWindow.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sddlZddlZddlmZddlZddlZddlTddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZmZdd
lmZdZd�Zed�Zdefd��YZe�Zd�Z defd��YZ!d�Z"d�Z#ddl$Z$e$Z%[$defd��YZ&d�Z'idd6dd6dd 6Z(d!�Z)d"�Z*d#�Z+e,d$krdd%l-m.Z.e.e e+�ndS(&i�N(tpython_version(t*(tMultiCallCreator(tidlever(t
WindowList(tSearchDialog(t
GrepDialog(t
ReplaceDialog(tPyParse(tidleConf(taboutDialogttextViewtconfigDialog(t
macosxSupporticCs�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*/sys/lib/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(tNonetsplittclosetimptfind_modulet	PY_SOURCEtload_modulet__path__tAttributeErrortImportErrort__name__t
__import__t__file__tostpathtsplitext(
tfullnameR(tfilettgttfilenametdescrtmoduletmtbasetext((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt_find_module%s2




	
t
HelpDialogcBs;eZd�Zdd�Zd�Zd�Zdd�ZRS(cCsd|_d|_dS(N(Rtparenttdlg(tself((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt__init__Hs	cCs9|jdkr|j|�n|r5|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
        N(R6Rtshow_dialogt
nearwindow(R7R5tnear((s*/sys/lib/python2.7/idlelib/EditorWindow.pytdisplayLscCsr||_tjjtjjtjjt��d�}tj|d|dt	�|_
}|jd|jd�dS(Nshelp.txttHelptmodals	<Destroy>t+(
R5R'R(tjointabspathtdirnameR&Rt	view_filetFalseR6tbindtdestroy(R7R5tfnR6((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR9Ys	-"cCs\|j}|j�d|j�df}|j�|jd|�|j�|j�dS(Ni
s=+%d+%d(R6twinfo_rootxtwinfo_rootytwithdrawtgeometryt	deiconifytlift(R7R;R6tgeom((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR:_s	 

cCsd|_d|_dS(N(RR6R5(R7tev((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRFjs	N(R$t
__module__R8RR<R9R:RF(((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR4Fs
	
		cCstj|�dS(N(t
helpDialogR9(R5((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt_help_dialogostEditorWindowcBs�eZddlmZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZdZddddd�Zd	�Zd
�Zd�Zd�Zd
�Zdd�Zd�d�d�d�d�d�d�gZejdkr
d�ed<nd �Zd!�ZdZ d"�Z!d�gZ"d%�Z#d&�Z$d'�Z%d(�Z&dd)�Z'dd*�Z(dd+�Z)dd,�Z*d-�Z+d.�Z,d/�Z-dd0�Z.dd1�Z/d2�Z0d3�Z1d4�Z2d5�Z3d6�Z4d7�Z5d8�Z6d9�Z7d:�Z8dd;�Z9dd<�Z:dd=�Z;d>�Z<d?�Z=d@�Z>dA�Z?dB�Z@dC�ZAdD�ZBdE�ZCdF�ZDdG�ZEdH�ZFdI�ZGdJ�ZHdK�ZIddL�ZJdM�ZKdN�ZLdO�ZMdP�ZNdQ�ZOdR�ZPdS�ZQdT�ZRdUdV�ZSdW�ZTdUdX�ZUdY�ZVdZ�ZWd[�ZXd\�ZYd]�ZZd^�Z[d_�Z\d`�Z]da�Z^db�Z_ddc�Z`dddd�Zade�Zbddf�Zcddg�Zddh�Zedi�Zfdj�Zgdk�Zheidl�Zjdm�Zkdn�Zldo�Zmdp�Zndq�Zodr�Zpds�Zqdt�Zrdu�Zsdv�Ztdw�Zudx�Zvdy�Zwdz�Zxd{�Zyd|�Zzd}�Z{d~�Z|RS(�i�(t
Percolator(tColorDelegator(t
UndoDelegator(t	IOBindingtfilesystemencodingtencoding(tBindings(tToplevel(tMultiStatusBarc	Cs�tjdkrvtjjtjdd�}tjj	d�r�ddtj
d }tjjd�rld}q
d	}tjj||dd�}n}tjd d
kr�jjtjddt��}tjj
|�r
|}q
n*tjdkr
tjjtjd
�}ntjj|�}tjj
|�r_|t_tjdkrsdtjt_qsqvdtj
d t_ntj�}	||_|p�|j}||_ytjWntk
r�dt_nXt|�|_tj|d|j�|_}
|r|j|_|j|j_ni|_i|j_tjjtj�d�|_t |
�|_!}t"|dd�|_#}tj$ddddd�|_%idd6dd6dd6|j%d6tj$ddd dd�d 6}
t&d!kr�|
d#<nt't(�||
�|_)}|j)|j_*|j+�|j,�|jj-d$|j.�|jj/d%|j0�t1j2�r�|j/d%|j0�|j/d&|j3�n|j/d'|j3�|j/d(|j4�|j/d)|j5�|j/d*|j6�|j/d+|j7�|j/d,|j8�|j/d-|j9�|j/d.|j:�|j/d/|j;�|j/d0|j<�|j/d1d2��|j/d3|j=�|j/d4|j>�|j/d5|j?�|j/d6|j@�|j/d7|jA�|j/d8|jB�|j/d9|jC�|j/d:|jD�|j/d;|jE�|j/d<|jF�|j/d=|jG�|j/d>|jH�|j/d?|jI�|j/d@|jJ�|j/dA|jK�|j/dB|jL�|j/dC|jM�|j/dD|jN�|j/dE|jO�|j/dF|jPdG��|j/dH|jPdI��|j/dJ|jQ�|j/dK|jR�|j/dL|jS�|r�||j|<|rb||jT|<n|j/dM|jU�|j/dN|jjV�|j/dO|jW�|j/dP|jX�n|jY�|jZ|dQ<|j[dRt\dSt]�|j^|dT<dU}tj$dddVddW�rdX}n|j_dYtj$dddY�tj$dddZdd�|f�|j[dRt`dStad[dI�|j[dRtbdStad[dI�|jc�tj$dd\d]ddW�}||_dd^|_e|je|_f|jg�th|_idi|_j|jk|�|_l}|jm�|_n}|jo|�|jp|_p|jq|_q|jr|js�|jt|�|_u}|jv|jw�t|j�|_x|jydbjzddcdddedGd|jx�|j{�d|_||r
	tjj}|�r�jj|�r�j~|�q
	|j|�n|j��|js�|j�|j�|��|j��|jyj�df�}|r�|j�dg�}|dkrz	dh}n|dGkr�|j��|dI}n||_�tj�|j��nt�j�|_�t�j�|_�t�j�|_�|j��dS(jNtDocs
index.htmltlinuxspython-docs-s%s.%s.%sis/var/www/html/python/s/var/www/html/python/index.htmls/usr/share/doc/twinsPython%s.chmtdarwins0Resources/English.lproj/Documentation/index.htmlsfile://shttp://docs.python.org/%d.%dis>>> tmenusrecent-files.lsttnametvbartmainRStwidthttypetintttextitpadxtnonetwraptheightg!@t
wordprocessorttabstyletWM_DELETE_WINDOWs<<close-window>>s<Control-Button-1>s<3>s<<cut>>s<<copy>>s	<<paste>>s<<center-insert>>s<<help>>s<<python-docs>>s<<about-idle>>s<<open-config-dialog>>s<<open-module>>s<<do-nothing>>cSsdS(Ntbreak((tevent((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt<lambda>�ss<<select-all>>s<<remove-selection>>s<<find>>s<<find-again>>s<<find-in-files>>s<<find-selection>>s<<replace>>s
<<goto-line>>s<<smart-backspace>>s<<newline-and-indent>>s<<smart-indent>>s<<indent-region>>s<<dedent-region>>s<<comment-region>>s<<uncomment-region>>s<<tabify-region>>s<<untabify-region>>s<<toggle-tabs>>s<<change-indentwidth>>s<Left>is<Right>is<<del-word-left>>s<<del-word-right>>s<<beginning-of-line>>s<<open-new-window>>s<<close-all-windows>>s<<open-class-browser>>s<<open-path-browser>>tcommandtsidetfilltyscrollcommandtnormals	font-boldtbooltboldtfonts	font-sizetexpandtIndents
use-spacesii2i�i@KLR+tlabelsRecent Filest	underlinetwindowstendi�(i2i�i@KL(�RSthelp_urlRR'R(R@RtprefixtplatformtcountRtisdirRtisfiletnormpathR	tCurrentThemetflisttroottps1R"tMenutmenubarRtListedToplevelttoptvarsttkinter_varstinversedictt
instance_dictt
GetUserCfgDirtrecent_files_pathtFramet
text_framet	ScrollbarRct	GetOptionRet	TkVersionRtTextRhtfocused_widgett
createmenubartapply_bindingstprotocolRREtclose_eventR
tisAquaTktright_menu_eventtcuttcopytpastetcenter_insert_eventthelp_dialogtpython_docstabout_dialogt
config_dialogtopen_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_bartyviewtpacktRIGHTtYtsettconfigtLEFTtBOTHtTOPt	focus_settusetabsttabwidthtindentwidthtset_notabs_indentwidthRDtcontext_use_ps1tnum_context_linesRTtperRVtundotinsertfiltertundo_block_starttundo_block_stoptset_saved_change_hooktsaved_change_hookRWtiotset_filename_change_hooktfilename_change_hooktrecent_files_menutmenudicttinsert_cascadetupdate_recent_files_listtcolortexiststloadfiletset_filenametResetColorizertset_indentation_paramstispythonsourcetload_extensionstgettindext
add_separatort	wmenu_endtregister_callbacktpostwindowsmenuttkMessageBoxtaskyesnottkSimpleDialogt
askintegert	showerrort_highlight_workaround(R7R�R-tkeyR�tdochometpyvertbasepathtchmfiletcurrentThemeR�R�Rcttext_optionsRht
fontWeightt	usespacesR�R�R�RaR�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR8~s@				

	







	


	
		


	%


	

	cs�tjjd�sdS|j��jdd��jdd��fd���jd�fd���jd�fd��dS(	NR_s<<Highlight-FocusOut>>s
<FocusOut>s<<Highlight-FocusIn>>s	<FocusIn>cs��jd�}|r�|dkritjtj�d�}�jd|��jd��jd|�q�|dkr��jddd�q�ndS(Ntseltoutthilitetsel_fixtins1.0R�(t
tag_rangesR	tGetHighlightR�t
tag_configt	tag_raisettag_addt
tag_remove(tfocust	sel_ranget
HILITE_CONFIG(Rh(s*/sys/lib/python2.7/idlelib/EditorWindow.pyt
highlight_fixls
cs
�d�S(NR((RO(R(s*/sys/lib/python2.7/idlelib/EditorWindow.pyRryscs
�d�S(NR((RO(R(s*/sys/lib/python2.7/idlelib/EditorWindow.pyRr{s(RR�t
startswithRht	event_addRE(R7((RRhs*/sys/lib/python2.7/idlelib/EditorWindow.pyR�bs			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
isinstancetunicodetdecodeRXtUnicodeDecodeErrorRY(R7R-((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt_filename_to_unicode~s

cCs)|jj�\}}|jj|�dS(NRp(R�tdefaultfilenameR�tnew(R7RqRBtbasename((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs||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\|jjddd�n�jjd�s�|jjdd�nY|jj|jjd�d|jjd��r�|jjdd�n|jjdd�|jj|�}|jjd�}|jj|d|�r)||}}n|jjddd�|jj
d||�|jjd|�|jjd�dS(NiitHometiomarks<=sinsert lineendsinsert linestartRit s	tinsertsinsert linestart+tcRs1.0R�s	sel.firstt	my_anchort<ssel.lastt>Rp(Rs	(tstatetkeysymRhR�tcompareRgRR�txrangetlentstrRtmark_setR
tsee(R7Rqtinsertpttlinetlineattdesttfirsttlast((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s>"(%	0cCs�|j|j�|_tjdkr@|jjdddt�n|jjdddt�|jjdddt�|jjdtd	t	�|j
jd
|j�|j
j
d
dd�|j
j|j�dS(
NR`t	_padding1s    RttcolumnsCol: ?R.sLn: ?Rus<<set-line-and-column>>s<KeyRelease>s<ButtonRelease>(R\R�t
status_barRR�t	set_labelR�R�tBOTTOMtXRhREtset_line_and_columnRt
after_idle(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s
cCsS|jjt�jd�\}}|jjdd|�|jjdd|�dS(NRR4sCol: %sR.sLn: %s(RhR�tINSERTRR5R6(R7RqR.R4((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR9�s!R+t_Fileteditt_EdittformattF_ormattrunt_Runtoptionst_OptionsRt_Windowsthelpt_HelpR`t_Windowi�cCs�|j}i|_}x_|jD]T\}}t|�\}}t|d|�||<}|jd|d|d|�q Wtj�r�t|dd�|d<}|jddd|�n|j�|jdj	t
�|_|j�dS(	NRbR}RaR~tappletapplicationtIDLERF(
R�R�t
menu_specstprepstrR�tadd_cascadeR
t
isCarbonTkt
fill_menusR�tENDtbase_helpmenu_lengthtreset_help_menu_entries(R7tmbarR�RbR}R~Ra((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s	
 
cCsk|jd}|jd�}|dkr1d}n||jkrZ|j|jd|�ntj|�dS(NRR�i�i(R�R�RR�tdeleteRtadd_windows_to_menu(R7RaR�((s*/sys/lib/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|\}}}Wntk
r�q�nX|dkr�q�nt
||��}|j|d|�q�W|j|j|j�|r!|jj	dd�ndS(	NR s@%d,%diR_tcursortarrowR%tibeam(RhR+txtytrmenut
make_rmenuRqRR�R�trmenu_specst
ValueErrorRtgetattrtentryconfigurettk_popuptx_rootty_root(	R7RqR\tiswintitemR}t	eventnametverify_stateR%((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s(#	
		
tCloses<<close-window>>cCs�t|jdd�}xg|jD]\}|d|d}}|dk	rq|j|d�}|jd|d|�q|j�qW||_dS(NttearoffiicSs|j|�dS(N(tevent_generate(RhRg((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRssR}Rs(R�RhR^Rtadd_commandR�R\(R7R\RfR}RgRs((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR]scCs
|j�S(N(trmenu_check_copy(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pytrmenu_check_cut#scCs=y|jjd�}Wntk
r*dSX|r5dSdSdS(Ns	sel.firsttdisabledRw(RhR�tTclError(R7tindx((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRm&s

cCs=y |jjjd|jd�Wntk
r4dSXdSdS(Nstk::GetSelectiont	CLIPBOARDRoRw(RhttktcallRp(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pytrmenu_check_paste.s
 
cCstj|jd�dS(Ns
About IDLE(R
tAboutDialogR�(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�6scCstj|jd�dS(NtSettings(RtConfigDialogR�(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�9scCs8|jr|j}n	|j}tj|d|j�dS(NR;(R�R�RQR<(R7RqR5((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�<s		cCsytjd dkreytj|j�Wqutk
ra}tjdddt|�d|j	�quXnt
j|j�dS(NiR_ttitlesDocument Start FailuretmessageR5Rp(RR�R't	startfileR�tWindowsErrorR�R�R*Rht
webbrowsertopen(R7Rqtwhy((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�CscCs|jjd�dS(Ns<<Cut>>Rp(RhRk(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�NscCs*|jjd�sdS|jjd�dS(NRs<<Copy>>Rp(RhR	Rk(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�RscCs$|jjd�|jjd�dS(Ns	<<Paste>>R Rp(RhRkR,(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�YscCs=|jjddd�|jjdd�|jjd�dS(NRs1.0send-1cR Rp(RhR
R+R,(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�^scCs*|jjddd�|jjd�dS(NRs1.0R�R (RhRR,(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�dscs:|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+1cssel.last-1ccsM|jd@dkrIy�d��d���WqItk
rEqIXndS(Niis	sel.firstR (R%Rp(Rq(t
edge_indextedges_tabletself_text_indextself_text_mark_set(s*/sys/lib/python2.7/idlelib/EditorWindow.pytmove_at_edgess

(ssel.first+1cssel.last-1c(RhR�R+(R7R�R�((R�R�R�R�s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�hs
cCs|jjd�dS(Ns
<Meta-Delete>Rp(RhRk(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�|scCs|jjd�dS(Ns<Meta-d>Rp(RhRk(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCstj|j�dS(NRp(RtfindRh(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCstj|j�dS(NRp(Rt
find_againRh(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCstj|j�dS(NRp(Rtfind_selectionRh(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs tj|j|j|j�dS(NRp(RtgrepRhR�R�(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCstj|j�dS(NRp(RtreplaceRh(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCsp|j}tjddd|�}|dkr1dS|dkrK|j�dS|jdd|�|jd�dS(NtGotosGo to line number:R5RpiR s%d.0(RhR�R�RtbellR+R,(R7RqRhtlineno((s*/sys/lib/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|�dS(Ns	sel.firstssel.lastttModulesAEnter the name of a Python module
to search on sys.path and open:R5tinitialvaluesImport errorsUnsupported types%s is not a source module(RhR�RptstripR�t	askstringR3t	NameErrorR#R�R�R*RRRR�R~R�R�(	R7RqRbtfR+tsuffixtmodeRftmsg((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s4

	"	
	cCs�|jj}|s<tjddd|j�|jj�dStjj	|�\}}tjj
|�\}}ddlm}|j|j
||g�dS(NsNo filenames&This buffer has no associated filenametmasteri�(tClassBrowser(R�R-R�R�RhR�RR'R(RR)tidlelibR�R�(R7RqR-theadttailR1R2R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s

cCs$ddlm}|j|j�dS(Ni�(tPathBrowser(R�R�R�(R7RqR�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCsl|dk	rh|dkrh|jjdd|�|jjddd�|jjddd�|j�ndS(NiR s%d.0Rs1.0R�s
insert +1l(RRhR+RR
tcenter(R7R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pytgotoline�s
cCs�|stjj|�rtStjjtjj|��\}}tjj|�dkr]tSy&t|�}|j�}|j	�Wnt
k
r�tSX|jd�o�|j
d�dkS(Ns.pys.pyws#!tpythoni(s.pys.pyw(R'R(R�tTrueR)RtnormcaseR~treadlineRtIOErrorRDRR�(R7R-R1R2R�R.((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s$
cCs)|jr%|jj|�d|_ndS(N(R�tunregister_maybe_terminateR(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt
close_hook�s	cCs
||_dS(N(R�(R7R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pytset_close_hook�scCsD|jr|jj|�n|j�|jj|�|j�dS(N(R�tfilename_changed_editR�R�tupdate_windowlist_registryR�(R7((s*/sys/lib/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-RUR�tremovefilterR�R�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt
_addcolorizer�s		cCs:|js
dS|jj�|jj|j�d|_dS(N(R�tremovecolorsR�R�R(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt_rmcolorizers
	
cCs�|j�|j�tjddd�}tj|d�}tj|ddd�}tj|d�}|jjd	|d	d
|d
d|d|d	d
|d
�dS(sUpdate the colour themeRdtThemeRbRwRWtfgBgtfgRt
foregroundt
backgroundtinsertbackgroundtselectforegroundtselectbackgroundN(R�R�R	R�R
RhR�(R7tthemet
normal_colorstcursor_colort
select_colors((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�
s




c	Csnd}tjddddd�r*d}n|jjdtjddd�tjddd	dd
�|f�dS(s.Update the text widgets' font if it is changedRwRdRSs	font-boldRfRxRyRzs	font-sizeRgN(R	R�RhR�(R7R((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt	ResetFonts	cCs�tj�|j_}x-|j�D]\}}|jj||�q#Wx\|j�D]N}tj|�}|rSx0|j�D]\}}|jj||�q{WqSqSWdS(s/Remove the keybindings before they are changed.N(	R	tGetCurrentKeySetRZtdefault_keydefstitemsRhtevent_deletetget_standard_extension_namestGetExtensionBindings(R7tkeydefsRqtkeylistt
extensionNametxkeydefs((s*/sys/lib/python2.7/idlelib/EditorWindow.pytRemoveKeybindings)sc
Cs�tj�|j_}|j�x9|j�D]+}tj|�}|r-|j|�q-q-Wi}xd|jjD]V}i||d<x?|dD]3}|r�|d||dt|d�d<q�q�WqoWx|j	j
�D]�|j	|}|jt�}|dkr
q�n|d7}x�td|�D]�}	|j|	�dkr'|j|	d�}
|
r�|j|	d�}d}||kr�|||kr�|||}q�n|r�t||�}
|j|	d|
�q�q�q'q'Wq�WdS(s-Update the keybindings after they are changediiRstacceleratorR}R�N(R	R�RZR�R�R�R�tmenudefsRMR�tkeysR�RQRtrangeRft	entrycgettget_acceleratortentryconfig(
R7R�R�R�t
menuEventDictRaRftmenubarItemR�R�tacceltitemNameRq((s*/sys/lib/python2.7/idlelib/EditorWindow.pytApplyKeybindings5s<
/

cCs.|js*tjddddd�|_ndS(sCUpdate the indentwidth if changed and not using tabs in this windowRdR|s
num-spacesRfRgN(R�R	R�R�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�Ys	cCs�tj�}|jd}|jt�}||jkrQ|j|jd|�n|r�|j�x>|D]3}|j|d�}|j	d|dd|�qhWn||jd<dS(s3Update the additional help entries on the Help menuRFiR}iRsN(
R	tGetAllExtraHelpSourcesListR�R�RQRRRUR�t"_EditorWindow__extra_help_callbackRl(R7t	help_listthelpmenuthelpmenu_lengthtentrytcmd((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRS`s


!cs|�fd�}|S(sCCreate a callback with the helpfile value frozen at definition timecs�|jd	�s$tjj|�}ntjd dkr�ytj|�Wq�tk
r�}tj	dddt
|�d�j�q�Xn
tj
|�dS(
NtwwwthttpiR_RysDocument Start FailureRzR5(R�R�(RR'R(R�RR�R{R|R�R�R*RhR}R~(thelpfileR(R7(s*/sys/lib/python2.7/idlelib/EditorWindow.pytdisplay_extra_helpss((R7R�R�((R7s*/sys/lib/python2.7/idlelib/EditorWindow.pyt__extra_help_callbackqscCsSg}tjj|j�rEt|jd��}|j�}WdQXn|r�tjj|�d}||kr}|j|�n|jd|�ng}xD|D]<}d|ks�tjj|dd!�r�|j	|�q�q�Wg|D]}||kr�^q�d}|dt
|�!}y,t|jd��}|j|�WdQXWn`tk
r�}t
|jd	t�s�t|j_tjd
ddd
t|�d|j�q�nXx�|jjj�D]�}	|	j}
|
jdt�xlt|�D]^\}}|j�}|j|�}
|	j|�}|
j d||d|
d|dd�q�q�WdS(s/Load and update the recent files list and menustrNs
iti�t1234567890ABCDEFGHIJKtwtrecentfilelist_error_displayedRys
IDLE ErrorRzs&Unable to update Recent Files list:
%sR5R}RRsR~(!R'R(R�R�R~t	readlinesRAtremoveR tappendR)t
writelinesR�R`R�RDR�R�R�R�R*RhR�R�R�R�RURQt	enumeratetrstripRt#_EditorWindow__recent_file_callbackRl(R7tnew_filetrf_listtrf_list_filet	bad_pathsR(tulcharstrf_fileterrtinstanceRatit	file_namet
ufile_nametcallback((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��sH
&%
	cs|�fd�}|S(Ncs�jjd|�dS(NteditFile(R�R~(t
fn_closure(R7(s*/sys/lib/python2.7/idlelib/EditorWindow.pytopen_recent_file�s((R7R�R�((R7s*/sys/lib/python2.7/idlelib/EditorWindow.pyt__recent_file_callback�scCs�|j�}|j�}|r5|r5|d|}n$|rD|}n|rS|}nd}|ph|ph|}|j�s�d|}d|}n|jj|�|jj|�dS(Ns - tUntitleds*%s*s*%s(tshort_titlet
long_titlet	get_savedR�twm_titletwm_iconname(R7tshorttlongRyticon((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s		

cCs
|jj�S(N(R�R�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs|jj|�dS(N(R�t	set_saved(R7tflag((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�scCs|jj�dS(N(R�t
reset_undo(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�scCsOdt�d}|jj}|r8tjj|�}nd}||j|�S(NsPython s: R�(RR�R-R'R(RR(R7t	pyversionR-((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs|j|jjpd�S(NR�(RR�R-(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs|j�dS(N(R�(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��sR cCsb|j}|j�\}}|j|�}||}td||d�}|jt|��dS(Nii(Rhtgetwindowlinest	getlinenotmaxR�tfloat(R7tmarkRhR�tbotR�Rltnewtop((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s	
cCsp|j}|jd�}|jd�}||krf|j�dkrft|d�}||d}n||fS(Ns@0,0s@0,65535iRl(RhRtwinfo_heightRg(R7RhR�RRl((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�s	cCs"|j}tt|j|���S(N(RhRgR	R�(R7R
Rh((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�s	cCs:|jj�}tjd|�}tt|j��}|S(sReturn (width, height, x, y)s(\d+)x(\d+)\+(-?\d+)\+(-?\d+)(R�twm_geometrytretmatchtmapRgtgroups(R7RNR0ttuple((s*/sys/lib/python2.7/idlelib/EditorWindow.pytget_geometry�scCs|j�dS(N(R(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCsh|jrd|j�sW|jj�dkr:|jj�n|jj�|jj�n|jj�SdS(NRw(R�R�R�R%RLtlowerRMt	maybesave(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�s	
cCs/|j�}t|�dkr+|j�n|S(Ntcancel(RR*t_close(R7treply((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRs
cCs�|jjr%|jd|jj�ntj|j�|j�|jj�d|_d|_	|j
r�|j
jt�d|_
nd|_d|_
|jj�d|_|jj�|jr�|j�ndS(NR�(R�R-R�Rtunregister_callbackR�tunload_extensionsRRR�R�RDRhR�R�R�RFR�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR
s"

					
	
	cCsi|_|j�dS(N(t
extensionstload_standard_extensions(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�s	cCsCx3|jj�D]"}t|d�r|j�qqWi|_dS(NR(RtvaluesthasattrR(R7tins((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR"scCs[xT|j�D]F}y|j|�Wq
dGt|�GHddl}|j�q
Xq
WdS(NsFailed to load extensioni�(R�tload_extensiontreprt	tracebackt	print_exc(R7RbR#((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR(scCstjdt�S(Nteditor_only(R	t
GetExtensionsR�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�1scCsVyt|t�t�g�}Wntk
r<dG|GHdSXt||�}tj|�}t|d�r�|j|j	|�n||�}||j
|<|rR|j|�x�|j�D]�}|j
dd�}x|d dkr�d}q�Wx|ddkr|d }q�d	}t||�r�|jj|t||��q�q�WndS(
Ns
Failed to import extension: R�t-t_iR#i�R$t_event(R%tglobalstlocalsR#R`R	R�RRPR�RR�R�R�RhRE(R7RbtmodtclsR�R tveventt
methodname((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR!4s,
	


cCsg|dkr|jj}n|j}||_x3|j�D]%\}}|r:|j||�q:q:WdS(N(RRZR�RhR�R�R(R7R�RhRqR�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�Ls		c
Csf|d	kr|jj}n|d	kr6|jj}n|j}|j}x|D]\}}|j|�}|svqOnx�D]�}|s�|j�q}|\}	}
|	d dk}|r�|	d}	nt|	�\}}	t	||
�}
||
d�}|r8|j
|
t�}|jd|	d|d|d|
d|�q}|j
d|	d|d|d|
�q}WqOWd	S(
sAdd appropriate entries to the menus and submenus

        Menus that are absent or None in self.menudict are ignored.
        it!cSs|j|�dS(N(Rk(RhRg((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRsnsR}R~RsR�tvariableN(RRZR�R�R�RhR�R�RMR�tget_var_objt
BooleanVartadd_checkbuttonRl(R7R�R�R�Rhtmnamet	entrylistRaR�R}RgtcheckbuttonR~R�Rstvar((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRPUs8		



cCs2|j|�}|r%|j�}|St|�dS(N(R2R�R�(R7RbR8tvalue((s*/sys/lib/python2.7/idlelib/EditorWindow.pytgetvarzs
cCs5|j||�}|r(|j|�n	t|�dS(N(R2R�R�(R7RbR9tvartypeR8((s*/sys/lib/python2.7/idlelib/EditorWindow.pytsetvar�scCs@|jj|�}|r<|r<||j�|j|<}n|S(N(R�R�Rh(R7RbR;R8((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR2�s
cCs<|jr4|jjd|�p3d|jj|�kSdSdS(NtTODOtSTRINGi(R�Rht
tag_prevranget	tag_names(R7t
text_index((s*/sys/lib/python2.7/idlelib/EditorWindow.pytis_char_in_string�s	cCsKy2|jjd�}|jjd�}||fSWntk
rFdSXdS(Ns	sel.firstssel.last(NN(RhR�RpR(R7R1R2((s*/sys/lib/python2.7/idlelib/EditorWindow.pytget_selection_indices�s
cCs|jdpt}t|�S(Nttabs(RhtTK_TABWIDTH_DEFAULTRg(R7tcurrent((s*/sys/lib/python2.7/idlelib/EditorWindow.pytget_tabwidth�scCs^|j}|j�|krZ|jjdd|dd|jd|�}|jd|�ndS(NRztmeasures
-displayoftnRD(RhRGRsRtR�t	configure(R7tnewtabwidthRhtpixels((s*/sys/lib/python2.7/idlelib/EditorWindow.pytset_tabwidth�s		
cCsu|ra|ra|j�}d|ko/dknr@||_n|j|jkrat|_qan|j|j�dS(Nii(tguess_indentR�R�RDR�RM(R7R�tguessR�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCs�|j}|j�\}}|rK|rK|j||�|jd|�dS|jdd�}|dkr�|jddd�r�|jd�n
|j�dS|dd	kr�|jd�dS|j}t|j	|��}|d
|j
|j
}|jrtj
jd�d}	nd}	d}
x\||	kr4Pn|d }|
d
}
t|j	|��}||ksy|dd	kr$Pq$q$|j�|jd
|
d�||kr�|jdd||�n|j�dS(NR Rpsinsert linestartR�R$s1.0s	insert-1ci�s 	is
is
insert-%dcR(RhRCRUR+R�R'R�R�R)t
expandtabsR�R�RR�RR�R R�(R7RqRhR1R2tcharsR�thavetwanttlast_line_of_promptt
ncharsdeleted((s*/sys/lib/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�}n3t
|j|j	��}|j}	d|	||	}|jd|�|jd�dSWd|j�XdS(NR sinsert linestarts	RRp(RhRCR�t
index2lineR�RUR+R�t
classifywsR�R)treindent_toR�R�RPR R,R�(
R7RqRhR1R2R�trawt	effectivetpadRI((s*/sys/lib/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�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|jdd�}|r�|d}nd}|j|d�}|j|�|jd�|j�}|t
jkrw|t
jkr��|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(
NR sinsert linestartis 	is
Rpi�sinsert - %d charss.0tconsoles1.0(,RhRCR�RUR+R�R)R RR�RRVR�RtParserR�R�R�R�RR"tset_strtfind_good_parse_startt_build_char_in_string_funcRtset_loR?tget_continuation_typetC_NONEtC_STRING_FIRST_LINEtC_STRING_NEXT_LINESt	C_BRACKETRXtcompute_bracket_indenttC_BACKSLASHtget_num_lines_in_stmttcompute_backslash_indenttget_base_indent_stringtis_block_openerR�tis_block_closerR�R,R�(R7RqRhR1R2R.R�RItindentRTtlnoR[tcontexttstartattstartatindextrawtexttbodR�R!((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR� s�	

%
	




cCs||jd�}|S(NcSs||d|�S(Ns+%dc((toffsett_startindext_icis((s*/sys/lib/python2.7/idlelib/EditorWindow.pytinner�s(RB(R7t
startindexRx((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR`�sc
Cs�|j�\}}}}xmtt|��D]Y}||}|r+t||j�\}}	|	|j}	|j|	�||||<q+q+W|j||||�dS(NRp(t
get_regionR�R)RWR�R�t_make_blankst
set_region(
R7RqR�R�RQtlinestposR.RYRZ((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s

"c
Cs�|j�\}}}}xvtt|��D]b}||}|r+t||j�\}}	t|	|jd�}	|j|	�||||<q+q+W|j||||�dS(NiRp(	RzR�R)RWR�RR�R{R|(
R7RqR�R�RQR}R~R.RYRZ((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s
"cCsk|j�\}}}}x6tt|�d�D]}||}d|||<q/W|j||||�dS(Nis##(RzR�R)R|(R7RqR�R�RQR}R~R.((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s

cCs�|j�\}}}}xttt|��D]`}||}|sGq+n|d dkrd|d}n|d dkr�|d}n|||<q+W|j||||�dS(Nis##it#(RzR�R)R|(R7RqR�R�RQR}R~R.((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s


c
Cs�|j�\}}}}|j�}|dkr4dSxutt|��D]a}||}|rGt||�\}	}
t|
|�\}}d|d|||	||<qGqGW|j||||�dS(Ns	R(Rzt_asktabwidthRR�R)RWtdivmodR|(
R7RqR�R�RQR}R�R~R.RYRZtntabstnspaces((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s
%cCs�|j�\}}}}|j�}|dkr4dSx1tt|��D]}||j|�||<qGW|j||||�dS(N(RzR�RR�R)RPR|(R7RqR�R�RQR}R�R~((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��scCsZ|jddd
|jdd|jdd	d
|j�rV|j|_d|_ndS(NsToggle tabss
Turn tabs tontoffs?
Indent width swill bes
remains ats 8.s!
 Note: a tab is always 8 columnsR5iRp(R�R�(swill bes
remains at(R�R�RhR�(R7Rq((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s!
cCs_|jddd|jd|jdddd�}|r[||jkr[|jr[||_nd	S(
NsIndent widths6New indent width (2-16)
(Always use 8 when using tabs)R5R�tminvalueitmaxvalueiRp(R�RhR�R�(R7RqR((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s			cCs�|j}|j�\}}|rP|rP|j|d�}|j|d�}n|jd�}|jd�}|j||�}|jd�}||||fS(Ns
 linestarts-1c lineend +1csinsert linestartsinsert lineend +1cs
(RhRCR�R�R(R7RhR1R2R�R�RQR}((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRz�s	cCs�|j}dj|�}||kr2|j�dS|jddd�|jd|�|j�|j||�|j||�|j�|j	d|d�dS(Ns
Rs1.0R�R (
RhR@R�RR+R�RUR R�R
(R7R�R�RQR}Rhtnewchars((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR|�s	


cCs=|jr1t||j�\}}d|d|Sd|SdS(Ns	R(R�R�R�(R7RIR�R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR{s	cCsk|j}|j�|jddd�r;|jdd�n|r]|jd|j|��n|j�dS(Nsinsert linestarts!=R (RhR�R'RUR R{R�(R7R4Rh((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRXs	
cCs.|jddd|jd|jdddd�S(	Ns	Tab widthsColumns per tab? (2-16)R5R�R�iR�i(R�RhR�(R7((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�!s		cCsrt|j|j�j�\}}|r`|r`t||j�\}}t||j�\}}n
d}}||S(Ni(tIndentSearcherRhR�RARW(R7topenertindentedRYtindentsmalltindentlarge((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRN/s!
N(sfileR<(seditR>(sformatR@(srunRB(RCRD(swindowsRE(shelpRG(swindowsRH(Ris<<close-window>>N(}R$RPtidlelib.PercolatorRTtidlelib.ColorDelegatorRUtidlelib.UndoDelegatorRVtidlelib.IOBindingRWRXRYR�RZtTkinterR[tidlelib.MultiStatusBarR\RR�R8R�RR�R�R�R9RLRR�R�R�R\R�R^R]RnRmRuR�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�RSR�R�R�R�R�RRR�R�R�R�RRRR�RRRR�RRR�R!R�RPR:R<R2RBRCRGRMR�R�R�R�R�R`R�R�R�R�R�R�R�R�RzR|R{RXR�RN(((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRSss��			)		
		
																		!											$			*						
			
													%							0	#	k					
					
		
			cCstt|��S(N(RgR	(R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRV9scCstd}}x]|D]U}|dkr:|d}|d}q|dkre|d}||d|}qPqW||fS(NiRis	((tsR�RYRZtch((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRWAs




R�cBs;eZd�Zd�Zejejd
d�Zd	�ZRS(cCs6||_||_d|_|_d|_|_dS(Ni(RhR�R�tfinishedRtblkopenlinetindentedline(R7RhR�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR8Ys		cCsd|jr
dS|jd}|_t|�d}|jj|dd�rMdS|jj||d�S(NR�is.0s>=R�s lineend+1c(R�R�R"RhR'R�(R7R�R
((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�_s	tclasstdeftfortifttrytwhilec		Cs^|jrnN||kr0||kr0||_n*||krZ|jrZ||_d|_ndS(Ni(R�R�R�(	R7RfttokentstartR�R.tINDENTtNAMEtOPENERS((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt
tokeneaterhs		cCsmtj}|jt_z;ytj|j|j�Wntjtfk
rNnXWd|t_X|j|j	fS(N(
t	_tokenizettabsizeR�ttokenizeR�R�t
TokenErrortSyntaxErrorR�R�(R7tsave_tabsize((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRAts	
(R�R�R�R�R�R�(	R$RPR8R�R�R�R�R�RA(((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR�Rs		
	cCs>|jd�}|dkr4|| ||d}n||fS(NR(ii(R�(R�R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRM�st[tbracketleftt]tbracketrightt/tslashcCs|j|�}|s7tj�r;|dddhkr;dS|d}tjdd�|�}tjdd	�|�}tjd
d|�}tjdd|�}tjd
d|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}|S(Ns<<open-module>>s
<<goto-line>>s<<change-indentwidth>>R�is-[a-z]\bcSs|j�j�S(N(tgrouptupper(R0((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRr�ss\b\w+\bcSstj|j�|j��S(N(tkeynamesR�R�(R0((s*/sys/lib/python2.7/idlelib/EditorWindow.pyRr�ssKey-tCancels
Ctrl-BreaksControl-sCtrl-R'R?s><RR#R$(R�R
t	isCocoaTkRtsub(R�RgR�R�((s*/sys/lib/python2.7/idlelib/EditorWindow.pyR��s"
cCsF|j}|jddd�|jddd�|jddd�dS(	Nttcl_wordBreakAftersa biR�t
tcl_wordcharss[a-zA-Z0-9_]ttcl_nonwordcharss
[^a-zA-Z0-9_](RsRt(R�Rs((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt
fixwordbreaks�s	cCs||}t|�tjdr-tjd}nd}tj|d�td|d|�}|jjd|j	�|j
�dS(NiR�R-s<<close-all-windows>>(R�RtargvRR
tsetupAppRSRhRER�tmainloop(R5R�R-R=((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt_editor_window�s

t__main__(RA(/RR'R�RRRR�R�R�R}tidlelib.MultiCallRR�RRRRRRtidlelib.configHandlerR	R
RRR
RERRR3tobjectR4RQRRRSRVRWR�R�R�RMR�R�R�R�R$tidlelib.idle_test.htestRA(((s*/sys/lib/python2.7/idlelib/EditorWindow.pyt<module>s^
	!(		���	
2		
				


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.