config root man

Current Path : /usr/local/lib/python2.5/idlelib/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/idlelib/EditorWindow.pyc

hRc@sddkZddkZddkZddkZddklZddkTddkZddkZddk	l
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddklZddkZddkZddkZddkZdZedZdefd	YZd
ZdZddkZeZ [defd
YZ!dZ"hdd<dd<dd<Z#dZ$dZ%dZ&e'djoe&ndS(iN(tcount(t*(tMultiCallCreator(tidleConficCsd}x|idD]}|dj	o|inti||\}}}|dtijoPnti||||}y
|i}Wqtj
ot	d|i
qXqW|||fS(sCVersion of imp.find_module() that handles hierarchical module namest.isNo source for module N(tNonetsplittclosetimptfind_modulet	PY_SOURCEtload_modulet__path__tAttributeErrortImportErrort__name__(tfullnametpathtfilettgttfilenametdescrtmodule((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt_find_modules

tEditorWindowcBseeZddklZddklZddklZddklZlZlZddkZddk	l
Z
ddklZdZ
dddddZd	Zd
ZdZddZdzd{d|d}d~ddgZeioed=ded<ndZdZdZd ZdgZd#Zdd$Zdd%Zdd&Zdd'Zd(Z d)Z!d*Z"dd+Z#dd,Z$d-Z%d.Z&d/Z'd0Z(d1Z)d2Z*d3Z+d4Z,d5Z-dd6Z.dd7Z/dd8Z0d9Z1d:Z2d;Z3d<Z4d=Z5d>Z6d?Z7d@Z8dAZ9dBZ:dCZ;dDZ<dEZ=dFZ>ddGZ?dHZ@dIZAdJZBdKZCdLZDdMZEdNZFdOZGdPdQZHdRZIdPdSZJdTZKdUZLdVZMdWZNdXZOdYZPdZZQd[ZRd\ZSd]ZTdd^ZUddd_ZVd`ZWddaZXddbZYdcZZddZ[deZ\dfZ]e^dgZ_dhZ`diZadjZbdkZcdlZddmZednZfdoZgdpZhdqZidrZjdsZkdtZlduZmdvZndwZodxZpdyZqRS(i(t
Percolator(tColorDelegator(t
UndoDelegator(t	IOBindingtfilesystemencodingtencodingN(tToplevel(tMultiStatusBarcCsB
tidjoltiitidd}tii	doWddti
d }tiido
d}qd	}tii||dd}ntid d
joGtiitiddti
d }tii|o
|}qn*t
iotiitid
}ntii|}tii|o1|t_tidjodtit_qxq|dt_nti}	||_|p|i}||_ytiWntj
odt_nXt||_ti|d|i|_}
|o|i|_|i|i_nh|_h|i_tiitid|_ t!|
dd|_"}t#|
|_$}ti%ddd|_&t't(|dddddddti)|	dd d!d"ti)|	dd d#d$ti)|	d%d d!d&ti)|	d%d d#d'ti)|	d(d d!d|i&d)ti%ddd)
|_*}
|i*|i_+|i,|i-|ii.d*|i/|ii0d+|i1t
io|
i0d+|i1n|
i0d,|i2|
i0d-|i3|
i0d.|i4|
i0d/|i5|
i0d0|i6|
i0d1|i7|
i0d2|i8|
i0d3|i9|
i0d4|i:|
i0d5d6|
i0d7|i;|
i0d8|i<|
i0d9|i=|
i0d:|i>|
i0d;|i?|
i0d<|i@|
i0d=|iA|
i0d>|iB|
i0d?|iC|
i0d@|iD|
i0dA|iE|
i0dB|iF|
i0dC|iG|
i0dD|iH|
i0dE|iI|
i0dF|iJ|
i0dG|iK|
i0dH|iL|
i0dI|iM|
i0dJ|iN|
i0dK|iOdL|
i0dM|iOdN|
i0dO|iP|
i0dP|iQ|ox||i|<|o||iR|<n|
i0dQ|iS|
i0dR|iiT|
i0dS|iU|
i0dT|iVn|iW|
iX|dU<|iYdVtZdWt[|i\|
dX<d}ti%dddYdZd[o
d\}n|
i]d]ti%ddd]ti%ddd^|f|iYdVt^dWt_d_dN|
iYdVt`dWt_d_dN|
iati%dd`dadZd[}||_bdb|_c|ic|_d|ietf|_gdm|_h|ii|
|_j}|ik|o$|il|_m}|in|n
d|_m|io|_p}|in||iq|
_q|ir|
_r|is|it|iu||_v}|iw|ixt|i|_y|izdfi{ddgdhdidLd|iy|i||oItii}|o%tii|o|i~|qo	|i|n|it|i|ik||i|izidj}|oh|idk}|djo
dl}n|dLjo|i|dN}n||_ti|inti|_ti|_ti|_dS(nNtDocs
index.htmltlinuxspython-docs-s%s.%s.%sis/var/www/html/python/s/var/www/html/python/index.htmls/usr/share/doc/twinsPython%d%d.chmis0Resources/English.lproj/Documentation/index.htmltdarwinsfile://s!http://www.python.org/doc/currents>>> tmenusrecent-files.lsttnametvbartmainRtwidthttexttpadxitwraptnonet
foregroundtnormaltfgBgtfgt
backgroundtbgthighlightcolorthilitethighlightbackgroundtinsertbackgroundtcursortheighttWM_DELETE_WINDOWs<<close-window>>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(tbreak((tevent((s0/usr/local/lib/python2.5/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<3>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<<open-new-window>>s<<close-all-windows>>s<<open-class-browser>>s<<open-path-browser>>tcommandtsidetfilltyscrollcommands	font-boldttypetbooltboldtfonts	font-sizetexpandtIndents
use-spacesii2ii@KLRtlabelsRecent Filest	underlinetwindowstendi(i2ii@KL(Rthelp_urlRtosRtjointsystprefixtplatformRtversion_infotisdirtisfilet
macosxSupporttrunningAsOSXApptnormpathRtCurrentThemetflisttroottps1R
tMenutmenubart
WindowListtListedToplevelttoptvarsttkinter_varstinversedictt
instance_dictt
GetUserCfgDirtrecent_files_patht	ScrollbarR'tFramet
text_framet	GetOptionR)RtTexttGetHighlightR*tfocused_widgett
createmenubartapply_bindingstprotocolRtbindtclose_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_eventtright_menu_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_righttdicttnew_callbacktclose_all_callbacktopen_class_browsertopen_path_browsertset_status_bartyviewtpacktRIGHTtYtsettconfigtLEFTtBOTHtTOPt	focus_settusetabsttabwidthtindentwidthtset_notabs_indentwidthtFalsetcontext_use_ps1tnum_context_linesRtpertispythonsourceRtcolortinsertfilterRtundotundo_block_starttundo_block_stoptset_saved_change_hooktsaved_change_hookRtiotset_filename_change_hooktfilename_change_hooktrecent_files_menutmenudicttinsert_cascadetupdate_recent_files_listtexiststloadfiletset_filenametset_indentation_paramstload_extensionstgettindext
add_separatort	wmenu_endtregister_callbacktpostwindowsmenuttkMessageBoxtaskyesnottkSimpleDialogt
askintegert	showerror(tselfRYRtkeyRZtdochometpyvertbasepathtchmfiletcurrentThemeR`R'RiR*t
fontWeightt	usespacesRRRRR%RK((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt__init__5sF


	
										










	
			


'





	cCst|tp|o|Snby|i|iSWnJtj
o>y|i|iSWqtj
o|idSqXnXdS(s8convert filename to unicode in order to display it in Tks	iso8859-1N(t
isinstancetunicodetdecodeRtUnicodeDecodeErrorR(RR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt_filename_to_unicodescCs)|ii\}}|ii|dS(NR;(RtdefaultfilenameRYtnew(RR<tdirnametbasename((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR$scCs|i|i|_tio|iidddtn|iidddt|iidddt|iidtdt	|i
id	|i|i
i
d	d
d|i
i|idS(Nt	_padding1s    R?tcolumnsCol: ?tlinesLn: ?R@s<<set-line-and-column>>s<KeyRelease>s<ButtonRelease>(R R`t
status_barRURVt	set_labelRRtBOTTOMtXR*Rqtset_line_and_columnt	event_addt
after_idle(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR)s

cCsS|iitid\}}|iidd||iidd|dS(NRRsCol: %sRsLn: %s(R*RtINSERTRRR(RR<RR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR7s!Rt_Fileteditt_EdittformattF_ormattrunt_Runtoptionst_OptionsRJt_Windowsthelpt_Helpit_WindowicCs|i}h|_}x_|iD]T\}}t|\}}t|d|||<}|id|d|d|q WtidjoDdtijo4t|dd|d<}|idd	d|n|i	|id
i
t|_|i
dS(NR&RHR%RIR$s
.frameworktappletapplicationtIDLER(R]Rt
menu_specstprepstrR\tadd_cascadeRORQt
executablet
fill_menusRtENDtbase_helpmenu_lengthtreset_help_menu_entries(RtmbarRR&RHRIR%((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRnKs	

  
cCso|id}|id}|djo
d}n||ijo|i|id|nti|dS(NRJRKii(RRRRtdeleteR^tadd_windows_to_menu(RR%RK((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR\s


cCs|iiddd|iidd|i|if|ip|in|i}||_ti	d dj}|o|ii
dd	n|i|i|i
|o|ii
dd
ndS(Ntsels1.0RKtinserts@%d,%diR#R8tarrowtibeam(R*t
tag_removetmark_settxtytrmenut
make_rmenuR<RORQRttk_popuptx_rootty_root(RR<Rtiswin((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRhs#
		tCloses<<close-window>>cCsdt|idd}x?|iD]4\}}|i|d}|id|d|qW||_dS(NttearofficSs|i|dS(N(tevent_generate(R*t	eventname((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR>~sRHR>(R\R*trmenu_specstadd_commandR(RRRHRR>((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR{s
cCsti|iddS(Ns
About IDLE(taboutDialogtAboutDialogR`(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRyscCsti|iddS(NtSettings(tconfigDialogtConfigDialogR`(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRzscCsGtiitiitiitd}ti|id|dS(Nshelp.txttHelp(	RMRRNtabspathRt__file__ttextViewt
TextViewerR`(RR<tfn((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRws-cCs<tid djoti|inti|idS(NiR#R;(RORQRMt	startfileRLt
webbrowsertopen(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRxscCs|iiddS(Ns<<Cut>>R;(R*R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRsscCs/|iidpdSn|iiddS(NRs<<Copy>>R;(R*t
tag_rangesR(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRtscCs|iiddS(Ns	<<Paste>>R;(R*R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRuscCs=|iiddd|iidd|iiddS(NRs1.0send-1cRR;(R*ttag_addRtsee(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR|scCs*|iiddd|iiddS(NRs1.0RKR(R*RR'(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR}scs:|ii|iidfd}|S(sCursor 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-1ccsQ|id@djo9yddWqMtj
oqMXndS(Niis	sel.firstR(tstatetTclError(R<(tself_text_indextedges_tabletself_text_mark_sett
edge_index(s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytmove_at_edges
(ssel.first+1cssel.last-1c(R*RR(RR-R.((R*R+R,R-s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
cCs|iiddS(Ns
<Meta-Delete>R;(R*R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs|iiddS(Ns<Meta-d>R;(R*R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCsti|idS(NR;(tSearchDialogtfindR*(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR~scCsti|idS(NR;(R/t
find_againR*(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCsti|idS(NR;(R/tfind_selectionR*(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs ti|i|i|idS(NR;(t
GrepDialogtgrepR*RRY(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCsti|idS(NR;(t
ReplaceDialogtreplaceR*(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCsz|i}tiddd|}|djodSn|djo|idSn|idd||iddS(NtGotosGo to line number:tparentR;iRs%d.0(R*RRRtbellRR'(RR<R*tlineno((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs		


c	Csgy|iidd}Wntj
o
d}nX|i}tiddd|id|}|o|i}n|pdSny"t|\}}\}}}Wn>ttfj
o,}t	i
dt|d|idSnX|ti
jo%t	i
d	d
|d|idSn|o|in|io|ii|n|ii|dS(Ns	sel.firstssel.lastttModulesAEnter the name of a Python module
to search on sys.path and open:R8tinitialvaluesImport errorsUnsupported types%s is not a source module(R*RR)tstripRt	askstringRt	NameErrorRRRtstrRR
RRYR$RR(	RR<R&tfRtsuffixtmodeRBtmsg((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR{s4	"		
cCs|ii}|p.tiddd|i|iidSntii	|\}}tii
|\}}ddk}|i|i||gdS(NsNo filenames&This buffer has no associated filenametmasteri(
RRRRR*RRRMRRtsplitexttClassBrowserRY(RR<RtheadttailtbasetextRH((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR
s

cCs ddk}|i|idS(Ni(tPathBrowserRY(RR<RM((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCso|dj	o^|djoQ|iidd||iiddd|iiddd|indS(NiRs%d.0Rs1.0RKs
insert +1l(RR*RRR&tcenter(RR:((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytgotolines
cCs|ptii|otSntiitii|\}}tii|djotSny&t|}|i}|i	Wnt
j
otSnX|ido|i
ddjS(Ns.pys.pyws#!tpythoni(s.pys.pyw(RMRRStTrueRGRtnormcaseR$treadlineRtIOErrorRt
startswithR0(RRRKRLRBR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR#s$	cCs"|io|ii|ndS(N(RYt
close_edit(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt
close_hook1s
cCs
||_dS(N(RW(RRW((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytset_close_hook5scCsj|io|ii|n|i|ii||i|iio|in|i	dS(N(
RYtfilename_changed_editRR`tupdate_windowlist_registryRRRtaddcolorizertrmcolorizer(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR8s

cCs^|iodSn|ii|i|i|_|ii|i|ii|idS(N(RRtremovefilterRRR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR[Bs
cCse|ipdSn|ii|ii|i|ii|id|_|ii|idS(N(RtremovecolorsRR]RRR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR\Js

	cCse|io&|i|_|ii|intiddd}|iiti|ddS(s(Update the colour theme if it is changedR(tThemeR&R/N(	RRRRRRjR*RRl(Rttheme((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytResetColorizerSs

cCsjd}tidddddo
d}n|iidtidddtiddd	|fd
S(s.Update the text widgets' font if it is changedR/R(Rs	font-boldRBRCRDREs	font-sizeN(RRjR*R(RR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt	ResetFont\s
cCsti|i_}x-|iD]\}}|ii||q#Wx^|iD]P}ti|}|o4x1|iD]\}}|ii||q|WqSqSWdS(s/Remove the keybindings before they are changed.N(	RtGetCurrentKeySettBindingstdefault_keydefstitemsR*tevent_deletetget_standard_extension_namestGetExtensionBindings(RtkeydefsR<tkeylistt
extensionNametxkeydefs((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytRemoveKeybindingsfs


c

Csti|i_}|ix;|iD]-}ti|}|o|i|q-q-Wh}xf|iiD]X}h||d<xA|dD]5}|o(|d||dt|dd<qqWqqWx|i	i
D]}|i	|}|itd}xt
d|D]}	|i|	djo|i|	d}
|
o|i|	d}d}|i|o*||i|o|||}qn|o&t||}
|i|	d|
qqqqWqWdS(s-Update the keybindings after they are changediiR>tacceleratorRHR;N(RRcRdReRoRhRitmenudefsRRtkeysRRtrangeRBt	entrycgetthas_keytget_acceleratortentryconfig(
RRjRlRmt
menuEventDictR%titemtmenubarItemRKRtacceltitemNameR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytApplyKeybindingsrs@


0
cCs0|ip"tiddddd|_ndS(sCUpdate the indentwidth if changed and not using tabs in this windowR(RGs
num-spacesRBtintN(RRRjR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
cCsti}|id}|it}||ijo|i|id|n|oL|ix?|D]3}|i|d}|i	d|dd|qkWn||id<dS(s3Update the additional help entries on the Help menuRiRHiR>N(
RtGetAllExtraHelpSourcesListRRRRRRt"_EditorWindow__extra_help_callbackR(Rt	help_listthelpmenuthelpmenu_lengthtentrytcmd((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs

"cCs|d}|S(sCCreate a callback with the helpfile value frozen at definition timecSs\|idptii|}ntid djoti|nti|dS(NtwwwthttpiR#(RR(	RURMRRWRORQR"R#R$(thelpfileturl((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytdisplay_extra_helps
((RRR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt__extra_help_callbackscCsg}tii|io4t|id}z|i}Wd|iXn|oHtii|d}||jo|i|n|i	d|ng}xG|D]?}d|jptii|dd!o|i
|qqWg}|D]}||jo||qq~}d}|dt|!}t|id}z|i|Wd|iXx|i
iiD]}	|	i}
|
id	txstt|D]_\}}|dd!}
|i|
}|	i|
}|
id
||d|d|d
dqWq~WdS(s/Load and update the recent files list and menustrNs
itit1234567890ABCDEFGHIJKtwiRHt R>RI(RMRRRfR$t	readlinesRRtremoveRtappendtlent
writelinesR`RdRqRRRtzipRRt#_EditorWindow__recent_file_callbackR(Rtnew_filetrf_listtrf_list_filet	bad_pathsRt_[1]tulcharstrf_filetinstanceR%tiRt	file_namet
ufile_nametcallback((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRsF
(2	
cs|fd}|S(Ncsiid|dS(NteditFile(RR$(t
fn_closure(R(s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytopen_recent_files((RRR((Rs0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt__recent_file_callbackscCs|i}|i}|o|o|d|}n)|o
|}n|o
|}nd}|p|p|}|ipd|}d|}n|ii||ii|dS(Ns - tUntitleds*%s*s*%s(tshort_titlet
long_titlet	get_savedR`twm_titletwm_iconname(Rtshorttlongttitleticon((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs



cCs
|iiS(N(RR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs|ii|dS(N(Rt	set_saved(Rtflag((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs|iidS(N(Rt
reset_undo(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs6|ii}|otii|}n|i|S(N(RRRMRRR(RR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs|i|iipdS(NR;(RRR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs|idS(N(RN(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRvsRcCsb|i}|i\}}|i|}||}td||d}|it|dS(Nii(R*tgetwindowlinest	getlinenotmaxRtfloat(RtmarkR*R`tbotR:R9tnewtop((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRNs	
cCss|i}|id}|id}||jo5|idjo"t|d}||d}n||fS(Ns@0,0s@0,65535iR9(R*Rtwinfo_heightR}(RR*R`RR9((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs	 cCs"|i}tt|i|S(N(R*R}RR(RRR*((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs	cCs:|ii}tid|}tt|i}|S(sReturn (width, height, x, y)s(\d+)x(\d+)\+(-?\d+)\+(-?\d+)(R`twm_geometrytretmatchtmapR}tgroups(Rtgeomtmttuple((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytget_geometry!scCs|idS(N(R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRr(scCsq|ioc|ipE|iidjo|iin|ii|iin|iiSndS(NR/(RRR`R(t	deiconifytlowertliftt	maybesave(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR+s


cCs1|i}t|djo|in|S(Ntcancel(RRAt_close(Rtreply((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR4scCs|iio|id|iinti|i|io|ind|_d}|i	|ii
d|_d|_|io0|ii
}|o|i}|ii
|nd|_d|_|ii
d|_|p|iindS(NRi(RRRR^tunregister_callbackRRWRRYtunload_extensionsRRRt
colorizingR`R*RbRtdestroy(RRtdoh((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR:s*

	

		
		
	cCsh|_|idS(N(t
extensionstload_standard_extensions(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyROs	cCsEx5|iiD]$}t|do|iqqWh|_dS(NR(RtvaluesthasattrR(Rtins((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRSs
cCs[xT|iD]F}y|i|Wq
dGt|GHddk}|iq
Xq
WdS(NsFailed to load extensioni(Rhtload_extensiontreprt	tracebackt	print_exc(RR&R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRYs
cCstidtS(Nteditor_only(Rt
GetExtensionsRQ(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRhbscCseyt|ttg}Wn tj
odG|GHdSnXt||}ti|}t|do|i|i	|n||}||i
|<|o|i|x|iD]}|i
dd}x |d djo|d}qWx |ddjo|d }qW|d	}t||o |ii|t||qqWndS(
Ns
Failed to import extension: Rpt-t_it<it>t_event(t
__import__tglobalstlocalsRtgetattrRRiRRRpRRoRqR6R*Rq(RR&tmodtclsRjRtveventt
methodname((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRes2		



cCsk|djo|ii}n|i}||_x5|iD]'\}}|o|i||q<q<WdS(N(RRdReR*RjRfR(RRjR*R<Rk((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRo}s
		
cCsr|d	jo|ii}n|d	jo|ii}n|i}|i}x|D]\}}|i|}|pqSnx|D]}|p|iq|\}	}
|	d dj}|o|	d}	nt|	\}}	t	||
}
||
d}|o>|i
|
t}|id|	d|d|d|
d|q|i
d|	d|d|d|
qWqSWd	S(
sAdd appropriate entries to the menus and submenus

        Menus that are absent or None in self.menudict are ignored.
        it!cSs|i|dS(N(R(R*R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR>sRHRIR>RotvariableN(RRdRpReRR*RRRRutget_var_objt
BooleanVartadd_checkbuttonR(RRpRjRR*tmnamet	entrylistR%RRHRtcheckbuttonRIRoR>tvar((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs<

		cCs7|i|}|o|i}|Sn
t|dS(N(RRR@(RR&Rtvalue((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytgetvars
cCs7|i||}|o|i|n
t|dS(N(RRR@(RR&RtvartypeR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytsetvarscCsC|ii|}|o%|o||i|i|<}n|S(N(RbRR*(RR&RR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCsB|io0|iid|pd|ii|jSndSdS(NtTODOtSTRINGi(RR*t
tag_prevranget	tag_names(Rt
text_index((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytis_char_in_strings
cCsPy2|iid}|iid}||fSWntj
odSnXdS(Ns	sel.firstssel.last(NN(R*RR)R(Rtfirsttlast((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytget_selection_indicesscCs|idpt}t|S(Nttabs(R*tTK_TABWIDTH_DEFAULTR}(Rtcurrent((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytget_tabwidthscCs`|i}|i|jo@|iidd|dd|id|}|id|ndS(NREtmeasures
-displayoftnR(R*RttktcallRFt	configure(RtnewtabwidthR*tpixels((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytset_tabwidths		
cCs}|ob|o[|i}d|jo
djno
||_n|i|ijo
t|_qin|i|idS(Nii(tguess_indentRRRRR
(RRtguessR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
cCs|i}|i\}}|o/|o(|i|||id|dSn|idd}|djo9|idddo|idn|idSn|dd	jo|iddSn|i}t|i	|}|d
jpt
|d|i|i}ti
idd}	d
}
xa||	joPn|d }|
d}
t|i	|}||jp|dd	joPq8q8|i|id
|
d||jo|idd||n|idS(NRR;sinsert linestartR;Rs1.0s	insert-1cis 	iis
s
insert-%dcR(R*RRRRtcompareR9RRt
expandtabstAssertionErrorRROR[RRRR(RR<R*RRtcharsRthavetwanttlast_line_of_promptt
ncharsdeleted((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRsF	


	





c
CsT|i}|i\}}|iz|oU|oNt|t|jo|i|Sn|i|||id|n|idd}t||i	\}}|t
|jo|i||inX|i
o
d}n4t
|i|i	}|i}	d|	||	}|id||iddSWd|iXdS(NRsinsert linestarts	RR;(R*RRt
index2lineRRRRt
classifywsRRtreindent_toRRRRR'R(
RR<R*RRRPtrawt	effectivetpadR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR+s,	


	
c	Cs7|i}|i\}}|iz|o+|o$|i|||id|n|idd}dt|}}x-||jo||djo|d}qW||jo|idddSn|| }d}ti	i
dd}	x>|o6|ddjo%||	jo|d }|d}qW|o|id	|dnx(|iddjo|idq]W|iddt|id}
t
i|i|i}|ipx|iD]}t|
|d}
|

d
}|i|d}|i||i|i|i|}|dj	p
|
djoPqqW|i|pdnZ|idd}|o|d}nd}|i|d}|i||id|i}|t
ijo|t
ijon|t
ijo|id|n|t
ijo|i|i ng|t
i!jo>|i"djo|id|q|i|i#ndpt$d
|fdSn|i%}|id||i&o|i'|n&|o|i(o|i)|ndSWd|i*d|i+XdS(NRsinsert linestartis 	is
R;isinsert - %d charss.0tconsoles1.0sbogus continuation type %r(,R*RRRRRRRROR[RRRtPyParsetParserRRRRRtset_strtfind_good_parse_startt_build_char_in_string_funcRtset_loRtget_continuation_typetC_NONEtC_STRING_FIRST_LINEtC_STRING_NEXT_LINESt	C_BRACKETRtcompute_bracket_indenttC_BACKSLASHtget_num_lines_in_stmttcompute_backslash_indentRtget_base_indent_stringtis_block_openerRtis_block_closerRR'R(RR<R*RRRRRtindentRtlnoR
tcontexttstartattstartatindextrawtexttbodRtc((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRNs	


%



	



cCs||id}|S(NcSs||d|S(Ns+%dc((toffsett_startindext_icis((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pytinners(R(Rt
startindexR9((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR sc
Cs|i\}}}}xott|D][}||}|oDt||i\}}	|	|i}	|i|	||||<q+q+W|i||||dS(NR;(t
get_regionRrRRRRt_make_blankst
set_region(
RR<RIRJRtlinestposRRR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs

#c
Cs|i\}}}}xxtt|D]d}||}|oMt||i\}}	t|	|id}	|i|	||||<q+q+W|i||||dS(NiR;(	R;RrRRRRRR<R=(
RR<RIRJRR>R?RRR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
#cCsk|i\}}}}x6tt|dD]}||}d|||<q/W|i||||dS(Nis##(R;RrRR=(RR<RIRJRR>R?R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
cCs|i\}}}}xztt|D]f}||}|pq+n|d djo|d}n |d djo|d}n|||<q+W|i||||dS(Nis##it#(R;RrRR=(RR<RIRJRR>R?R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
c
Cs|i\}}}}|i}xwtt|D]c}||}|oLt||\}	}
t|
|\}}d|d|||	||<q7q7W|i||||dS(Ns	R(R;t_asktabwidthRrRRtdivmodR=(
RR<RIRJRR>RR?RRRtntabstnspaces((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
&cCsr|i\}}}}|i}x1tt|D]}||i|||<q7W|i||||dS(N(R;RARrRRR=(RR<RIRJRR>RR?((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRscCs\|iddd
|idd|idd	d
|io|i|_d|_ndS(NsToggle tabss
Turn tabs tontoffs?
Indent width swill bes
remains ats 8.s!
 Note: a tab is always 8 columnsR8iR;(sonsoff(swill bes
remains at(RRR*R(RR<((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs!


cCsc|iddd|id|idddd}|o(||ijo|io
||_nd	S(
NsIndent widths6New indent width (2-16)
(Always use 8 when using tabs)R8R=tminvalueitmaxvalueiR;(RR*RR(RR<R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs			"
cCs|i}|i\}}|o1|o*|i|d}|i|d}n|id}|id}|i||}|id}||||fS(Ns
 linestarts-1c lineend +1csinsert linestartsinsert lineend +1cs
(R*RRRR(RR*RRRIRJRR>((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR;s	cCs|i}di|}||jo|idSn|iddd|id||i|i|||i|||i|i	d|ddS(Ns
Rs1.0RKR(
R*RNR9RRRRRRR&(RRIRJRR>R*tnewchars((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR=*s	



cCsB|io,t||i\}}d|d|Sn	d|SdS(Ns	R(RRBR(RRRCRD((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR<:s
cCso|i}|i|idddo|iddn|o|id|i|n|idS(Nsinsert linestarts!=R(R*RR
RRR<R(RRR*((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRDs	
cCs8|iddd|id|iddddp|iS(	Ns	Tab widthsColumns per tab? (2-16)R8R=RGiRHi(RR*RR(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRAMs		cCsut|i|ii\}}|o;|o4t||i\}}t||i\}}nd}}||S(Ni(tIndentSearcherR*RRR(RtopenertindentedRtindentsmalltindentlarge((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR[s!
(sfileR(seditR(RR(srunR(RR(swindowsR(shelpR(swindowsR(Rs<<close-window>>(rRt
__module__RRRRRRRdtTkinterRR RRLRRRRRRRURVRnRRRRRRyRzRwRxRsRtRuR|R}RRRR~RRRRRR{RRRORRWRXRR[R\RaRbRnR|RRRRRRRRRRRRvRNRRRRrRRRRRRRhRRoRRRRRRRR
RQRRRRR RRRRRRRRR;R=R<RRAR(((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR*s				
		
															!					
						
		 			(									
													%							-	#	k					
					
		
			cCstt|S(N(R}R(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRescCsxd}}xa|D]Y}|djo|d}|d}q|djo |d}||d|}qPqW||fS(NiRis	((tsRRRtch((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRms




RJcBs;eZdZdZeieid
dZd	ZRS(cCs6||_||_d|_|_d|_|_dS(Ni(R*RRtfinishedRtblkopenlinetindentedline(RR*R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs		cCsn|iodSn|id}|_t|d}|ii|ddodSn|ii||dS(NR;is.0s>=RKs lineend+1c(RSRRR*R
R(RRR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRSs
tclasstdeftfortifttrytwhilec		Csf|ionU||jo||jo
||_n.||jo |io||_d|_ndS(Ni(RSRTRU(	RRBttokentstartRKRtINDENTtNAMEtOPENERS((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt
tokeneaters

	c	Csiti}|it_z7yti|i|iWntij
onXWd|t_X|i|ifS(N(	t	_tokenizettabsizeRttokenizeRSRat
TokenErrorRTRU(Rtsave_tabsize((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs		
(RVRWRXRYRZR[(	RRORRSRbR^R_RaR(((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRJ~s		
	cCs@|id}|djo|| ||d}n||fS(NRii(R0(RQR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRs
t[tbracketleftt]tbracketrightt/tslashcCs|i|}|pdSn|d}tidd|}tidd|}tidd|}tidd	|}tid
d|}tidd
|}tidd|}tidd|}tidd|}|S(NR;is-[a-z]\bcSs|iiS((tgrouptupper(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR=ss\b\w+\bcSsti|i|iS((tkeynamesRRm(R((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyR=ssKey-tCancels
Ctrl-BreaksControl-sCtrl-Rt+s><RRR(RRtsub(RjRRkRQ((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyRus
cCsF|i}|iddd|iddd|iddddS(	Nttcl_wordBreakAftersa biRt
tcl_wordcharss[a-zA-Z0-9_]ttcl_nonwordcharss
[^a-zA-Z0-9_](RR(RZR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyt
fixwordbreakss	cCst}t||itidotid}nd}td|d|}|i|i|i	|i
dS(NiRZR(tTkRvtwithdrawROtargvRRRXtquittmainloopR(RZRR((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pyttests	


t__main__((RORMRRt	itertoolsRRPRRt	MultiCallRR#tidleverR^R/R3R5Rt
configHandlerRRRRRURRRtobjectRRRRdRbRJRRoRuRvR|R(((s0/usr/local/lib/python2.5/idlelib/EditorWindow.pys<module>sT
$@		
2								



Man Man