Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U i_N@sddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Tddl m Z ddlmZddlmZddlmZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lm Z dd lm!Z!ddlm"Z"ddlm#Z#ddl$m%Z%ddlm&Z&dZ'de(Z)ejdkZ*ddZ+Gddde,Z-ddZ.e/dZ0ddZ1Gddde,Z2d d!Z3d"d#d$d%Z4d&d'Z5d(d)Z6d*d+Z7e8d,krdd-l9m:Z:e:d.d/d0d1dd2l;md;d<Z?dd=d>Z@dd?d@ZAddAdBZBddCdDZCdEdFZDdGdHZEdIdJZFddKdLZGddMdNZHdOdPZIdQdRZJdSdTZKdUdVZLdWdXZMdYdZZNd[d\ZOd]d^ZPd_d`ZQdadbZRdcddZSddedfZTddgdhZUddidjZVdkdlZWdmdnZXdodpZYdqdrZZdsdtZ[dudvZ\dwdxZ]dydzZ^e_j`e_jad{Zbd|d}Zcd~dZdddZeddZfddZgddZhddZiddZjdddZkddZlddZmddZnddZoddZpddZqddZrddZsdddZtddZudddZvddZwddZxddZyddZzddZ{ddZ|ddZ}ddZ~ddZddiZddZdddZdddZddZddd„ZdddĄZddƄZddȄZddʄZdd̄Zddd΄ZddЄZdd҄ZddԄZddքZdd؄ZddڄZdd܄ZdddބZdS) EditorWindowr) Percolator)ColorDelegator color_config) UndoDelegator) IOBindingencoding)mainmenu)MultiStatusBar) AutoComplete) AutoExpand)Calltip) CodeContext) LineNumbers)FormatParagraph FormatRegionIndentsRstrip) ParenMatch)Squeezer) ZoomHeightNTc CsH ddlm}tjdkrtjtjdd}tj drvddtj dd}tj d r^d }qd }tj||dd}nVtj ddd krtjtjdd t } tj| r| }ntj dkrtjtjd}tj|}tj|r|t_tj dkrdtjt_ndtj ddt_||_|p*|j}||_t||_tj||jd|_} |rl|j|_|j|j_ni|_i|j_tjotjtjd|_d|_t| |_ } t!| dd|_"} tj#ddddd} dddd| d tj#ddd!ddd"}t$t%| f||_&}|j&|j_'|(|)|j*d#|j+|j,d$|j-t./rt|,d$|j-|,d%|j0|,d&|j0n|,d'|j0|,d(t1|,d)t1|,d*t1|,d+|j2|,d,|j3|,d-|j4|,d.|j5|,d/|j6|,d0|j7|,d1|j8|,d2|j9|,d3|j:|,d4|j;|,d5d6d7|,d8|j<|,d9|j=|,d:|j>|,d;|j?|,d<|j@|,d=|jA|,d>|jB|,d?|jC|,d@|jD|,dA|jE|,dB|jF|G||_H}|,dC|jI|,dD|jJ|,dE|jK|,dF|jL|,dG|jM|,dH|jN|O|}|,dI|jP|,dJ|jQ|,dK|Rd|,dL|RdM|,dN|jS|,dO|jT|,dP|jU|r||j|<|r||jV|<|,dQ|jW|,dR|jjX|,dS|jY|,dT|jZ|,dU|j[|\| j]t^t_dMdV| j`dMdMdW| jadMdMdW|jb| dX<| jcdMdtddY| je|dZ<tf|jdd|d[<|jcdMdMtddY|g|htj#dd\d]d^d}| |_id_|_j|jj|_k|ltmtd`s|j&dat_n|odb|_p|q||_r}|s|_t}|u||jv|_v|jw|_w|x|jy|z||_{}|||j}dc|_~|dcd|_d|_d|_|rtj|rtj |s||rdd|_~||}||n||dd|_~||y|||jde}|rP|df}|dkr$dg}|dkr>||dM}||_t|jtj|_tj|_tj|_|dhdi|djdkdldm|dndo|dpdq|drdqdsdt||}|,dh|j|,dj|j|,du|j|,dv||j|,dw||j||}|,dx|j|,dr|j||}|,dy|j|,dz|j|,d{|j|,d|||j|||_}|,dn|j|,dp|j|,d}|j|,d~||j|jr|||_|,d|jjn|ddd|j r6|||_tj#dddd^d r&||,d|jn|ddddS)Nr) ScriptBindingZDocz index.htmllinuxz python-docs-z%s.%s.%sz/var/www/html/python/z/var/www/html/python/index.htmlz/usr/share/doc/winz Python%s.chmrz0Resources/English.lproj/Documentation/index.htmlzfile://zhttps://docs.python.org/%d.%d/)menuzrecent-files.lstvbar)namemainr!widthinttypetextZnoneZ wordprocessorheight)r>padxwrapZhighlightthicknessr@ZtabstylerFZWM_DELETE_WINDOW<>zz<2>z<3>z z z z z<>z<>z <>z<>z<>z<>z<>z<><>z<>cSsdSNbreakreventrrrz'EditorWindow.__init__..z<>z<>z<>z<>z<>z<>z <> <>z<>z<>z<>z<>z<>z<>z<>z<>z<>z<><>zzz<>z<>z<>z<>z<>z<>z<>z<>)sidefillexpand)Zweightcommand)rowcolumnZstickyZyscrollcommandfontIndentz use-spacesboolrblink_off_time insertofftime)2ii@KLFTrendz<>z z<>zzzz<>zz<>zz<>zzz<>z<>z<>z<>z<>z<>z<>z <>z<>z<>z<>optionsz *Code Contextdisabledzline-numbers-defaultz<> *Line Numbers)Zidlelib.runscriptr6r!help_urlospathjoinr base_prefixplatformcountrisdirr isfilenormpathflistrootMenumenubarrZListedTopleveltopvars tkinter_varsZ inversedict instance_dictrZuserdirrecent_files_pathprompt_last_lineFrame text_framerr= GetOptionr ZTextrDZfocused_widget createmenubarapply_bindingsprotocolclosebind close_eventr ZisAquaTkright_menu_eventrhandle_winconfigcutcopypastecenter_insert_event help_dialog python_docs about_dialog config_dialogopen_module_event select_allremove_selection find_eventfind_again_eventfind_in_files_eventfind_selection_event replace_eventgoto_line_eventsmart_backspace_eventnewline_and_indent_eventsmart_indent_eventr0fregionindent_region_eventZdedent_region_eventZcomment_region_eventZuncomment_region_eventZtabify_region_eventZuntabify_region_eventr1Ztoggle_tabs_eventZchange_indentwidth_eventmove_at_edge_if_selection del_word_leftdel_word_right home_callbackdict new_callbackZclose_all_callbackopen_module_browseropen_path_browseropen_turtle_demoset_status_barpackZLEFTZBOTHZ rowconfigureZcolumnconfigure handle_yviewZgridZNSEWsetGetFontZ focus_set set_widthusetabstabwidth indentwidthset_notabs_indentwidthhasattrr]update_cursor_blinknum_context_linesr"perr%undo insertfilterundo_block_startundo_block_stopZset_saved_change_hooksaved_change_hookr&ioZset_filename_change_hookfilename_change_hookZ good_loadset_indentation_paramscolor code_context line_numbersexistsloadfileispythonsourceZ set_filenameResetColorizerupdate_recent_files_listload_extensionsmenudictgetindex add_separator wmenu_endZregister_callbackpostwindowsmenu tkMessageBoxZaskyesnotkSimpleDialogZ askinteger showerror event_addr*Zautocomplete_eventZtry_open_completions_eventZforce_open_completions_eventr+Zexpand_word_eventr/Zformat_paragraph_eventr3Zflash_paren_eventZparen_closed_eventZcheck_module_eventZrun_module_eventZrun_custom_eventr2Z do_rstripr,ctipZtry_open_calltip_eventZrefresh_calltip_eventZforce_open_calltip_eventr5Zzoom_height_eventallow_code_contextr-Ztoggle_code_context_eventupdate_menu_stateallow_line_numbersr.toggle_line_numbers_event)selfrofilenamekeyrpr6ZdochomeZpyverZbasepathZchmfilersrzr=r@Z text_optionsrDrindentsZ usespacesrrr is_py_srcr;r`Z autocompleteZ parenmatchZ scriptbindingrrrr__init__Hs                                                  zEditorWindow.__init__cCs |dSN)rrrNrrrr`szEditorWindow.handle_winconfigcCs^|j}tt|jj|d|dg}|d|}t||ddd}|||_ dS)NZborderrGr:rZ)rZ0) rDsummaptkZgetintZcgetZ winfo_widthrmeasurer@)rrDZ inner_paddingZ pixel_widthZzero_char_widthrrrrcszEditorWindow.set_widthcCs|j\}}|j|dSrK)rZdefaultfilenameronew)rrNdirnamebasenamerrrrps zEditorWindow.new_callbackcCs|jd@dkr|jdkrdS|jdrd|jdddrd|jdddrdt|jddd }n8|jdd}tt |D]}||d kr~qq~t |}t|jd dd }||krd}d t |d }|jd @dkr|j dddn|jds|j dd n@|j|jdd|jd rB|j ddn|j dd|j|}|jd}|j|d|r||}}|j ddd|j d|||j d ||jd dS)NrZHomeZiomark<=zinsert lineendinsert linestart.rS)  insertzinsert linestart+csel1.0r` sel.firstZ my_anchor<sel.last>rL)stateZkeysymrDrcomparerAsplitrrangelenstr tag_removemark_settag_addsee)rrNZinsertptlineZlineatdestfirstlastrrrrusF       zEditorWindow.home_callbackcCs||j|_t|jdddd}tjdkr<|jjddtd|jjdd td|jjd d td|jjt t d |jt t d |j d |j |j d dd|j |j dS)NrSZgrey75)rFZ borderwidthZ backgroundrZ _padding1z )rTrYzCol: ?rzLn: ?)rTrUz<>z z)r)rs status_barryrrj set_labelZRIGHTrZBOTTOMXrDrset_line_and_columnrZ after_idle)rseprrrrs zEditorWindow.set_status_barcCs>|jtd\}}|jdd||jdd|dS)NrrYzCol: %srzLn: %s)rDrZINSERTrrr)rrNrrYrrrrsz EditorWindow.set_line_and_column)fileZ_File)editZ_Edit)formatZF_ormat)runZ_Run)rbZ_Options)rZ_Window)rZ_HelpcCs|j}i|_}|jD]:\}}t|\}}t||dd||<}|j|||dqtr~t|ddd|d<}|jd|d|t|jdd|_ |jd j d d d|j d |jd  t |_ |dS)Nr)r>tearoff)labelr; underlineZappleZ applicationZIDLE)rr;rrr8z Recent Files)rrr;r)rrr menu_specsprepstrrqZ add_cascader Z isCarbonTk fill_menusrecent_files_menuZinsert_cascaderENDbase_helpmenu_lengthreset_help_menu_entries)rZmbarrr>rrr;rrrr|s&  zEditorWindow.createmenubarcCsJ|jd}|d}|dkr d}||jkr<||jd|t|dS)Nrr`rarS)rrrdeleterZadd_windows_to_menu)rr;r`rrrrs   zEditorWindow.postwindowsmenucCs|j|}|j||ddS)z$Update label for menu item at index.)rNr entryconfig)rr;rrmenuitemrrrupdate_menu_labels zEditorWindow.update_menu_labelcCs|j|}|j||ddS)z$Update state for menu item at index.rNr)rr;rrrrrrrs zEditorWindow.update_menu_statecGsR|dkr       zEditorWindow.right_menu_event)CloserINcCsft|jdd}|jD]F}|d|d}}|dk rR|j|fdd}|j||dq|q||_dS)Nrr rScSs||dSrevent_generaterDr)rrrrW"sz(EditorWindow.make_rmenu..commandrrW)rqrDr% add_commandrr#)rr#r(rr)rWrrrr$s  zEditorWindow.make_rmenucCs|Sr)rmenu_check_copyrrrrrmenu_check_cut)szEditorWindow.rmenu_check_cutcCs8z|jd}Wntk r&YdSX|r0dSdSdS)NrrcnormalrDrr")rZindxrrrr0,s zEditorWindow.rmenu_check_copycCs8z|jjd|jdWntk r.YdSXdSdS)Nztk::GetSelectionZ CLIPBOARDrcr3)rDrcallr"r1rrrrmenu_check_paste4s zEditorWindow.rmenu_check_pastecCst|jdS)zHandle Help 'About IDLE' event.rL)r Z AboutDialogrsrrrrr<s zEditorWindow.about_dialogcCst|jddS)z&Handle Options 'Configure IDLE' event.ZSettingsrL)rZ ConfigDialogrsrrrrrBszEditorWindow.config_dialogcCs"|jr|j}n|j}t|dS)zHandle Help 'IDLE Help' event.rL)rprsrZ show_idlehelp)rrNparentrrrrHs  zEditorWindow.help_dialogc Csntjdddkr^zt|jWqjtk rZ}ztjdt||j dW5d}~XYqjXn t |jdS)Nr8r9Document Start Failuretitlemessager7rL) rrjrf startfilereOSErrorrrrrD webbrowseropen)rrNwhyrrrrRs zEditorWindow.python_docscCs|jddS)Nz<>rLrDr,rrrrr]s zEditorWindow.cutcCs |jdsdS|jddS)Nrz<>rL)rDZ tag_rangesr,rrrrras  zEditorWindow.copycCs|jd|jddS)Nz <>rrL)rDr,rrrrrrhs  zEditorWindow.pastecCs.|jddd|jdd|jddS)Nrrzend-1crrL)rDrrrrrrrrms zEditorWindow.select_allcCs |jddd|jddS)Nrrr`rrL)rDrrrrrrrss zEditorWindow.remove_selectioncs*|jj|jjdfdd}|S)zCursor 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. )z sel.first+1cz sel.last-1ccsB|jd@dkr>zddWntk r<YnXdS)NrErrr)rr"rM edge_indexZ edges_tableZself_text_indexZself_text_mark_setrr move_at_edges z.move_at_edge)rDrr)rrCrDrrBrrxs z&EditorWindow.move_at_edge_if_selectioncCs|jddS)Nz rLrArrrrrs zEditorWindow.del_word_leftcCs|jddS)NzrLrArrrrrs zEditorWindow.del_word_rightcCst|jdSrK)rfindrDrrrrrs zEditorWindow.find_eventcCst|jdSrK)rZ find_againrDrrrrrs zEditorWindow.find_again_eventcCst|jdSrK)rZfind_selectionrDrrrrrs z!EditorWindow.find_selection_eventcCst|j|j|jdSrK)rrDrrorrrrrsz EditorWindow.find_in_files_eventcCst|jdSrK)rrDrrrrrs zEditorWindow.replace_eventcCsT|j}t|ddj}|dk rP|ddd|d|d|d|dS) Nz Go To Linez/Enter a positive integer ('big' = end of file):rrr`r.0rL)rDr ZGotoresultrrrr)rrNrDlinenorrrrs zEditorWindow.goto_line_eventcCspz|jdd}Wntk r.d}YnXt|jdd|j}|dk rl|jr`|j|n |j ||S)zGet module name from user and open it. Return module path or None for calls by open_module_browser when latter is not invoked in named editor window. rrr<z Open ModulezAEnter the name of a Python module to search on sys.path and open:N) rDrstripr"r Z ModuleNamerGror?rr)rr> file_pathrrr open_modules  zEditorWindow.open_modulecCs |dSrK)rKrrrrrszEditorWindow.open_module_eventcCsJ|jj}|jjdkr|s,|}|dkr,dSddlm}||j|dS)NZPyShellEditorWindowrLr)browser) rr __class____name__rKidlelibrLZ ModuleBrowserrp)rrNrrLrrrrs  z EditorWindow.open_module_browsercCsddlm}||jdS)Nr) pathbrowserrL)rOrPZ PathBrowserrp)rrNrPrrrrs  zEditorWindow.open_path_browsercCs&ddl}tjddg}|j|dddS)Nrz-cz,from turtledemo.__main__ import main; main()F)shellrL) subprocessr executablePopen)rrNrRcmdrrrrszEditorWindow.open_turtle_democCsN|dk rJ|dkrJ|jdd||jddd|jddd|dS)Nrrz%d.0rrr`z insert +1l)rDrrrcenter)rrHrrrgotolines zEditorWindow.gotolinecCs`|rtj|rdStjtj|\}}tj|dkr@dS|jdd}|do^d|kS)NT)z.pyz.pywrz 1.0 lineendz#!Zpython) rfrgrlsplitextrnormcaserDr startswith)rrbaseextrrrrrszEditorWindow.ispythonsourcecCs|jr|j|d|_dSr)roZunregister_maybe_terminater1rrr close_hooks zEditorWindow.close_hookcCs ||_dSr)r])rr]rrrset_close_hookszEditorWindow.set_close_hookcCs2|jr|j|||j||dSr)roZfilename_changed_editrrsZupdate_windowlist_registryrr1rrrrs   z!EditorWindow.filename_change_hookcCsV|jr dS||jjr"||_|jrR|j|j|j|j|j|jdSr) rrrrr#r removefilterrrr1rrr _addcolorizer s zEditorWindow._addcolorizercCs,|js dS|j|j|jd|_dSr)rZ removecolorsrr_r1rrr _rmcolorizers  zEditorWindow._rmcolorizercCsH||t|j|jdk r0|j|jdk rD|jdS)zUpdate the color themeN) rar`r!r$rDrZupdate_highlight_colorsrZ update_colorsr1rrrrs    zEditorWindow.ResetColorizer_cCsp|d|||}|r6||jkr6|d|d|d||krR|d|n|d|d||dS)NERRORz wordstart rz+1c)rr IDENTCHARSrr)rrDposcharrrrcolorize_syntax_error+s  z"EditorWindow.colorize_syntax_errorcCs2tjddddd}|s"d|jd<n tj|jd<dS) z&Update the cursor blink configuration.r?r!z cursor-blinkr\rBrr^N)rr{rDr])rZ cursorblinkrrrr6s z EditorWindow.update_cursor_blinkcCsN|jdk r|j|jdk r(|jt|jdd}||jd<|dS)z.Update the text widgets' font if it is changedNr?r!rZ)rZ update_fontrrrrprDr)rZnew_fontrrr ResetFont@s     zEditorWindow.ResetFontcCsxt|j_}|D]\}}|jj|f|q|D]6}t|}|r<|D]\}}|jj|f|qVqr?)helpfiler@r1rrdisplay_extra_helps  z>EditorWindow.__extra_help_callback..display_extra_helpr)rrzr{rr1rZ__extra_help_callbacks z"EditorWindow.__extra_help_callbackc sg}|j}|r>tj|r>t|dddd}|}W5QRX|rptj|d}||krd|||d|g|D]*}d|kstj|ddsx |qxfd d |D}d }|dt |}|rRz*t|d ddd}| |W5QRXWnVt k rP}z6t |jd ds@d|j_tjdd|d|jdW5d}~XYnX|jjD]Z} | j} | dtt|D]8\} } | } | | } | j|| d| | ddqxqZdS)z/Load and update the recent files list and menusrutf_8r)r'errorsrdrracsg|]}|kr|qSrr).0rgZ bad_pathsrr sz9EditorWindow.update_recent_files_list..Z1234567890ABCDEFGHIJKwrecentfiles_messageFTz IDLE Warningz)Cannot save Recent Files list to disk. z Select OK to continue.r9Nr)rrWr)rwrfrgrr? readlinesabspathremoverappendr writelinesr=r'rprr showwarningrDrsrvr rr enumeraterstrip#_EditorWindow__recent_file_callbackr/)rnew_fileZrf_listrJZ rf_list_filergZulcharsZrf_fileerrinstancer;i file_namecallbackrrrrs\       z%EditorWindow.update_recent_files_listcs|ffdd }|S)Ncsjj|ddS)N)ZeditFile)rr?)Z fn_closurer1rropen_recent_filesz=EditorWindow.__recent_file_callback..open_recent_filer)rrrrr1rZ__recent_file_callbacksz#EditorWindow.__recent_file_callbackcCs|}|}|r*|r*|d|t}n|r4|}n|r>|}nd}|pL|pL|}|sfd|}d|}|j||j|dS)Nz - untitledz*%s*z*%s) short_title long_title _py_version get_savedrsZwm_titleZ wm_iconname)rZshortlongr:Ziconrrrrs  zEditorWindow.saved_change_hookcCs |jSr)rrr1rrrrszEditorWindow.get_savedcCs|j|dSr)r set_saved)rflagrrrrszEditorWindow.set_savedcCs|jdSr)r reset_undor1rrrrszEditorWindow.reset_undocCs|jj}|rtj|SdS)Nr)rrrfrgr)rrrrrrszEditorWindow.short_titlecCs |jjp dS)Nr<)rrr1rrrrszEditorWindow.long_titlecCs |dSrK)rVrrrrrsz EditorWindow.center_insert_eventrcCsH|j}|\}}||}||}td||d}|t|dS)NrSr:)rDgetwindowlinesrmaxrr)rmarkrDrsbotrHrFZnewtoprrrrVs   zEditorWindow.centercCsN|j}|d}|d}||krF|dkrFt|d}||d}||fS)Nrz@0,65535rSrF)rDrZ winfo_heightrA)rrDrsrrFrrrr s    zEditorWindow.getwindowlinescCs|j}tt||Sr)rDrArr)rrrDrrrrszEditorWindow.getlinenocCs(|j}td|}ttt|S)zReturn (width, height, x, y)z(\d+)x(\d+)\+(-?\d+)\+(-?\d+))rsZ wm_geometryrematchlistrrAgroups)rZgeommrrr get_geometrys  zEditorWindow.get_geometrycCs |dSrK)rrrrrrszEditorWindow.close_eventcCsH|jrD|s:|jdkr&|j|j|j|jSdS)Nr3)rrrsrZ deiconifylowerZlift maybesaver1rrrr!s   zEditorWindow.maybesavecCs<z"|}t|dkr||WStk r6YnXdS)Ncancel)rr_closeAttributeError)rZreplyrrrr*s zEditorWindow.closecCs|jjr|j|jjdt|j||jd|_d|_|j rX|j d|_ d|_ d|_ |j d|_ |j |jr|dS)N)r)rrrrZunregister_callbackrunload_extensionsrrrrDrurrsZdestroyr]r1rrrr3s"     zEditorWindow._closecCsi|_|dSr) extensionsload_standard_extensionsr1rrrrGszEditorWindow.load_extensionscCs0t|jD]}t|dr|qi|_dS)Nr)rrvaluesrr)rinsrrrrKs  zEditorWindow.unload_extensionscCsD|D]6}z||Wqtdt|tYqXqdS)NzFailed to load extension)rmload_extensionprintrepr traceback print_exc)rr>rrrrQs  z%EditorWindow.load_standard_extensionscCs tjddS)NT)Z editor_only)rZ GetExtensionsr1rrrrmYsz)EditorWindow.get_standard_extension_namesZZzDummyZzzdummyc Cs:|j||}z>ztjd|td}Wn"ttfk rHt|}YnXWn tk rltd|YnXt||}t |}t |dr| |j |||}||j|<|r6|||D]t}|dd}|dddkr|dd}q|d dd kr|dd }q|d }t ||r|j|t||qdS) Nr)packagez Failed to import extension: ru-rbrSrrarZ_event)extfilesr importlib import_module __package__ ImportError TypeErrorrr'rrnrr rurr}rrDr) rr>ZfnamemodclsrorZveventZ methodnamerrrr`s4        zEditorWindow.load_extensioncCsF|dkr|jj}|j}||_|D]\}}|r$|j|f|q$dSr)r(rkrDrorlr)rrorDrNrprrrr}|szEditorWindow.apply_bindingsc Cs|dkr|jj}|dkr |jj}|j}|j}|D]\}}||}|sHq0|D]}|s^|qL|\} } | dddk} | r| dd} t| \} } t|| } || fdd}| r| | t }|j | | || |dqL|j | | || dqLq0dS)zAdd appropriate entries to the menus and submenus Menus that are absent or None in self.menudict are ignored. NrS!cSs||dSrr+r-rrrrWsz(EditorWindow.fill_menus..command)rrrWrtvariable)rrrWrt) r(rurkrrDrrr rv get_var_objZ BooleanVarZadd_checkbuttonr/)rrurorrDZmnameZ entrylistr;ryrr)Z checkbuttonrrtrWvarrrrr s>       zEditorWindow.fill_menuscCs&||}|r|}|St|dSr)rr NameError)rr>rvaluerrrgetvars  zEditorWindow.getvarcCs(|||}|r||nt|dSr)rrr)rr>rvartyperrrrsetvars  zEditorWindow.setvarcCs,|j|}|s(|r(||j|j|<}|Sr)rurrD)rr>rrrrrrs zEditorWindow.get_var_objcCs,|jr$|jd|p"d|j|kSdSdS)NZTODOSTRINGrS)rrD tag_prevrangeZ tag_names)rZ text_indexrrris_char_in_strings zEditorWindow.is_char_in_stringcCs>z"|jd}|jd}||fWStk r8YdSXdS)Nrr)NNr4)rrrrrrget_selection_indicess    z"EditorWindow.get_selection_indicescCs|jdp t}t|S)Ntabs)rDTK_TABWIDTH_DEFAULTrA)rcurrentrrrget_tk_tabwidthszEditorWindow.get_tk_tabwidthc CsB|j}||kr>|jdd|dd|jd|}|j|ddS)NrZrz -displayofn)r)rDrrr5ZmasterZ configure)rZ newtabwidthrDZpixelsrrrset_tk_tabwidths zEditorWindow.set_tk_tabwidthcCsP|r@|r@|}d|kr$dkr.nn||_|j|jkr@d|_||jdS)Nr:rF) guess_indentrrrr)rrZguessrrrrrs z#EditorWindow.set_indentation_paramsc CsP|j}|\}}|r6|r6||||d|dS|dd}|dkrp|dddrd|dn|dS|dd kr|ddS|j}t| |}|d kst |d |j |j }d } ||j krАq|dd}| d } t| |}||ks|dd krqq| |d | d||krD|dd |||dS)NrrLrr<rrz insert-1cra rrSz insert-%dcr)rDrrrrrZbellrr expandtabsAssertionErrorrrxrrr) rrNrDrrcharsrZhaveZwantZ ncharsdeletedrrrrsB           z"EditorWindow.smart_backspace_eventc Cs|j}|\}}|z|r\|r\t|t|krD|j|WS||||d|| dd}t ||j \}}|t |kr| ||jn>|jrd}n&t ||j }|j} d| || }|d||dWdS|XdS)NrrrrrL)rDrrr index2linerrrrrget_line_indentrr reindent_torrrrr) rrNrDrrprefixrawZ effectiveZpadrrrrr&s,       zEditorWindow.smart_indent_eventc Cs|j}|\}}|z|r>|r>||||d||dd}dt|}}||krv||dkrv|d7}qX||kr| ddWXdS|d|}d}|r|d dkr||j kr|dd }|d7}q|r|d |d|ddkr|dq| ddt | d} t |j|j} |j s|jD]`} t| | d} t| d } || d}| || || }|dk s| dkr<qq<| |pdn@|d d}|r|d} nd } || d}| || d| }|t jkr|t jkrn|t jkr,| d|nh|t jkrH|| nL|t j kr| !dkrp| d|n|| "ndst#d|fWPdS| $}| d|| %r|&|n|r| 'r|(|WdS|d|XdS)aInsert a newline and indentation after Enter keypress event. Properly position the cursor on the new line based on information from the current line. This takes into account if the current line is a shell prompt, is empty, has selected text, contains a block opener, contains a block closer, is a continuation line, or is inside a string. rrrrrSrdrLNrazinsert - %d charsrFZconsolerzbogus continuation type %r))rDrrrrrrrrrrxrrr ZParserrrrrrZset_codeZfind_good_parse_start_build_char_in_string_funcZset_lorZget_continuation_typeZC_NONEZC_STRING_FIRST_LINEZC_STRING_NEXT_LINESZ C_BRACKETrZcompute_bracket_indentZ C_BACKSLASHZget_num_lines_in_stmtZcompute_backslash_indentrZget_base_indent_stringZis_block_openerrZis_block_closerr)rrNrDrrrrrindentlnor!contextZstartatZ startatindexZrawtextZbodr|rrrrrIs                                 z%EditorWindow.newline_and_indent_eventcCs||jfdd}|S)NcSs||d|S)Nz+%dcr)offsetZ _startindexZ_icisrrrinnersz6EditorWindow._build_char_in_string_func..inner)r)rZ startindexrrrrrs z'EditorWindow._build_char_in_string_funccCs2|jr&t||j\}}d|d|Sd|SdS)Nrr)rdivmodr)rrZntabsZnspacesrrr _make_blanksszEditorWindow._make_blankscCsJ|j}||dddr(|dd|r>|d|||dS)Nrz!=r)rDrrrrrr)rrYrDrrrrs zEditorWindow.reindent_tocCsPt|j|j\}}|r@|r@t||j\}}t||j\}}nd}}||SNr)IndentSearcherrDrrr)ropenerZindentedrZ indentsmallZ indentlargerrrrs zEditorWindow.guess_indentcCsN|jdkrdS|jjr&|jd}n|jd}|jdd|dddS)NZShowZHiderbrdz Line Numbers)r;rr)rZis_shownZ hide_sidebarZ show_sidebarr)rrNZ menu_labelrrrrs   z&EditorWindow.toggle_line_numbers_event)NNNN)N)N)N)N)N)N)N)N)N)N)N)N)r)r)N)NN)N)N)T)N)rN __module__ __qualname__Zidlelib.percolatorr"Zidlelib.colorizerr#r$Z idlelib.undor%Zidlelib.iomenur&r'rOr(Zidlelib.statusbarr)Zidlelib.autocompleter*Zidlelib.autoexpandr+Zidlelib.calltipr,Zidlelib.codecontextr-Zidlelib.sidebarr.Zidlelib.formatr/r0r1r2Zidlelib.parenmatchr3Zidlelib.squeezerr4Zidlelib.zoomheightr5rgetfilesystemencodingZfilesystemencodingrerrrrrrrrrr r|rrrrr#rr%r$r2r0r6rrrrrrrrrrrrrrrrrrrKrrrrrWrr]r^rr`rarstring ascii_lettersdigitsrerhrrirsrwrrrxrrrrrrrrrrVrrrrrrrrrrrmrrr}r rrrrrrrrrrrrrrrrrrrrr!1s               +    %              $ .     %     ,#v  r!cCs tt|Sr)rAr)rrrrrsrz[ \t]*cCs$t|}|t||fS)zReturn a line's indentation as (# chars, effective # of spaces). The effective # of spaces is the length after properly "expanding" the tabs into spaces, as done by str.expandtabs(tabwidth). )_line_indent_rerr`rgroupr)rrrrrrrs rc@s8eZdZddZddZejejdfddZdd Z d S) rcCs(||_||_d|_|_d|_|_dSr)rDrrfinished blkopenline indentedline)rrDrrrrrs zIndentSearcher.__init__cCsL|jr dS|jd}|_t|d}|j|ddr:dS|j||dS)Nr<rSrFz>=r`z lineend+1c)rrrrDrr)rrrrrrreadlines zIndentSearcher.readline)classdefforiftrywhilec Cs>|jrn2||kr ||kr ||_n||kr:|jr:||_d|_dS)NrS)rrr) rrCtokenstartr`rINDENTNAMEZOPENERSrrr tokeneater#szIndentSearcher.tokeneaterc Cshtj}|jt_zDz$t|j}|D]}|j|q"Wntjtfk rNYnXW5|t_X|j|j fSr) tokenizetabsizergenerate_tokensrr TokenError SyntaxErrorrr)rZ save_tabsizetokensrrrrr/s  zIndentSearcher.runN) rNrrrrrrrrrrrrrr s  rcCs6|d}|dkr.|d|||dd}||fS)NrbrrS)rE)srrrrr As r []/)Z bracketleftZ bracketrightZslashcCs||}|rtr"|dkr"dS|d}tddd|}tddd|}td d|}td d |}td d |}tdd|}tdd|}tdd|}tdd|}|S)N>rJrQrRr<rz-[a-z]\bcSs |Sr)rupperrrrrrOZrPz!get_accelerator..z\b\w+\bcSst||Sr)keynamesrrr rrrrO[rPzKey-ZCancelz Ctrl-BreakzControl-zCtrl-r+z>tkinterZ tkinter.fontrZ tkinter.ttkrZtkinter.simpledialogZ simpledialogrZtkinter.messageboxZ messageboxrZidlelib.configrrOrrrr r Zidlelib.multicallr r r rrZ idlelib.treerrrZpython_versionrrr objectr!rcompilerrrr r rvrrrNZunittestr?Zidlelib.idle_test.htestrrrrrsx                    X  4