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_ @sddlZedkr ejdejd<z ddlTWn*ek rVedejdedYnXejdkrz ddl Z dZ e d  e Wnee efk rYnXddlmZed kreatdd lmZetejd d etdedddlmZddlZddlZddlZddlmZddlZddl Z ddl!Z!ddl"m#Z#ddl$Z$ddl%Z%ddl&Z&ddl'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl,m.Z.ddl/m0Z0m1Z1ddl2m3Z3ddl4m5Z5ddl,m6Z6ddlm7Z7m8Z8m9Z9ddl:m;Z;dZd:ddZ?da@dd ZAeAd!dejBfd"d#ZCeCe_BGd$d%d%e0ZDGd&d'd'e3ZEGd(d)d)e)ZFGd*d+d+e;ZGGd,d-d-e6jHZId.d/ZJGd0d1d1eZKGd2d3d3e5ZLd4d5ZMd6ZNd7d8ZOedkreOeAd9dS);N__main__zidlelib.pyshell)*zJ** IDLE can't import Tkinter. Your Python may not be configured for Tk. **filewin32Zshcoreg!@ fix_scalingzIdle Cannot Startz"Idle requires tcl/tk 8.5+, not %s.parent)InteractiveInterpreter)python_version) TextWrapper)ColorDelegator)idleConfdebugger) debugger_r) EditorWindow fixwordbreaks)FileList) OutputWindow)rpc)idle_formatwarning StdInputFile StdOutputFile) UndoDelegatorz 127.0.0.1c CsP|dkr t}z&|t|||||d|dWnttfk rJYnXdS)aShow Idle-format warning (after replacing warnings.showwarning). The differences are the formatter called, the file=None replacement, which can be None, the capture of the consequence AttributeError, and the output of a hard-coded prompt. N)line>>> )warning_streamwriterAttributeErrorOSError)messagecategoryfilenamelinenorrr'./opt/python38/lib/python3.8/idlelib/pyshell.pyidle_showwarningEsr)cCs0|rtdkr,tjatt_ntdk r,tt_dadS)z>Replace warning.showwarning with idle_showwarning, or reverse.N)_warnings_showwarningwarnings showwarningr))capturer'r'r(capture_warningsXsr.TcCsXtj}i}t|D].}|dd|dddkr||||<q||||dS)aoExtend linecache.checkcache to preserve the entries Rather than repeating the linecache code, patch it to save the entries, call the original linecache.checkcache() (skipping them), and then restore the saved entries. orig_checkcache is bound at definition time to the original method, allowing it to be patched. Nr<>) linecachecachelistpopupdate)r%Zorig_checkcacher2savekeyr'r'r(extended_linecache_checkcachegs  r8c@s~eZdZdZddZdddddd gZd d d Zd dZd!ddZd"ddZ ddZ ddZ ddZ ddZ ddZddZdS)#PyShellEditorWindowz6Regular text edit window in IDLE, supports breakpointscGsg|_tj|f||jd|j|jd|j|jd|jjt j t j d|_|jj|fdd}|j||jjr||dS)N<><>z<>zbreakpoints.lstcSs||dSN)restore_file_breaks)Zold_hookselfr'r'r(filename_changed_hooksz;PyShellEditorWindow.__init__..filename_changed_hook) breakpointsr__init__textbindset_breakpoint_hereclear_breakpoint_hereflist open_shellospathjoinrZuserdirbreakpointPathioZfilename_change_hookZset_filename_change_hookr%r=color_breakpoint_text)r>argsr?r'r'r(rAs   zPyShellEditorWindow.__init__)ZCutz<>rmenu_check_cut)ZCopyz<>Zrmenu_check_copy)ZPastez <>rmenu_check_paste)NNN)zSet Breakpointr:N)zClear Breakpointr;NTcCsD|jdkrdS|r(t}t|d}n ddd}|jd|dS)z,Turn colorizing of breakpoint text on or offNbreak) foreground backgroundBREAK)rLr CurrentTheme GetHighlightrBZ tag_config)r>ZcolorthemeZcfgr'r'r(rMs  z)PyShellEditorWindow.color_breakpoint_textcCs|j}|jj}|dd|d|dz|j|Wn tk rX|j|YnXz|jj j j }| ||Wn YnXdS)NrUz%d.0r) rBrLr%tag_addr@index ValueErrorappendrFpyshellinterprrD)r>r&rBr%debugr'r'r(set_breakpoints z"PyShellEditorWindow.set_breakpointNcCs>|j}|jj}|s|dStt|d}||dS)Ninsert)rBrLr%bellintfloatrZr`)r>eventrBr%r&r'r'r(rDsz'PyShellEditorWindow.set_breakpoint_herecCs|j}|jj}|s|dStt|d}z|j|Wn YnX| dddz|j j j j }|||Wn YnXdS)NrarUinsert linestartzinsert lineend +1char)rBrLr%rbrcrdrZr@remove tag_removerFr]r^rrE)r>rerBr%r&r_r'r'r(rEs$ z)PyShellEditorWindow.clear_breakpoint_herecCsd|jr`|j}|jj}|s$|dSg|_|ddtz|jjj j }| |Wn YnXdS)NrU1.0) r@rBrLr%rbrhZENDrFr]r^rclear_file_breaks)r>rBr%r_r'r'r(rjs z%PyShellEditorWindow.clear_file_breaksc Cs|j}|jj}z$t|jd}|}W5QRXWntk rJg}YnXzjt|jdT}|D]}||ds`||q`| |j}|r||dt |dW5QRXWnTtk r }z4t |j ddsd|j _ tjdd t ||jd W5d }~XYnXd S) z#Save breakpoints when file is savedrw= breakpoint_error_displayedFTz IDLE Errorz$Unable to update breakpoint list: %s)titler#r N)r@rLr%openrK readlinesr" startswithr update_breakpointsstrgetattrrootro tkMessageBox showerrorrB)r>Zbreaksr%fplinesZnew_filererrr'r'r(store_file_breakss2  (z%PyShellEditorWindow.store_file_breaksc Cs|j|jdkrdS|jj}|dkr,dStj|jrt|jd}| }W5QRX|D]>}| |dr^t |t |dd}|D]}| |qq^dS)Nrkrmr)rBr5rLr%rHrIisfilerKrqrrrsevallenr`)r>r%rzr{rZbreakpoint_linenumbersZbreakpoint_linenumberr'r'r(r= s  z'PyShellEditorWindow.restore_file_breakscCs$|j}|d}||}||_dS)z3Retrieves all the breakpoints in the current windowrUN)rBZ tag_rangesranges_to_linenumbersr@)r>rBrangesZlinenumber_listr'r'r(rts  z&PyShellEditorWindow.update_breakpointscCsbg}tdt|dD]H}tt||j}tt||dj}||kr|||d7}q@q|S)Nrr)rangerrcrdstringr\)r>rr{rZr&endr'r'r(r%s  z)PyShellEditorWindow.ranges_to_linenumberscCs|t|dS)z7Extend base method - clear breaks when module is closedN)rjr_closer>r'r'r(r6szPyShellEditorWindow._close)T)N)N)__name__ __module__ __qualname____doc__rA rmenu_specsrMr`rDrErjr}r=rtrrr'r'r'r(r9~s&  *r9c@s"eZdZdZeZdZdddZdS)PyShellFileListz8Extend base class: IDLE supports a shell and breakpointsNcCs8|jr|jjnt||_|jr2|js2dS|jSr<)r]topwakeupPyShellbeginr>rer'r'r(rGEs  zPyShellFileList.open_shell)N)rrrrr9rr]rGr'r'r'r(r<src@s0eZdZdZddZddZddZdd Zd S) ModifiedColorDelegatorz8Extend base class: colorizer for the shell window itselfcCst||dSr<)rrA LoadTagDefsrr'r'r(rASs zModifiedColorDelegator.__init__cCs*|ddd|dddt|dS)NZTODOriiomarkZSYNC)rhrYrrecolorize_mainrr'r'r(rWsz&ModifiedColorDelegator.recolorize_mainc CsJt|t}|jdddt|dt|dt|dddS)N)rTrSstdoutstderrconsole)stdinrrr)rrrrVtagdefsr5rW)r>rXr'r'r(r\s    z"ModifiedColorDelegator.LoadTagDefscCs|jD]}||ddqdS)Nrr)rrh)r>tagr'r'r( removecolorsfs z#ModifiedColorDelegator.removecolorsN)rrrrrArrrr'r'r'r(rPs  rc@s$eZdZdZdddZdddZdS) ModifiedUndoDelegatorz;Extend base class: forbid insert/delete before the I/O markNcCsNz$|j|ddr"|jWdSWntk r8YnXt||||dSNrZcharstagsr'r'r(rans  zModifiedUndoDelegator.insertcCsLz$|j|ddr"|jWdSWntk r8YnXt|||dSr)rrrbrrdelete)r>Zindex1Zindex2r'r'r(rws  zModifiedUndoDelegator.delete)N)N)rrrrrarr'r'r'r(rks rc@seZdZddZdS) MyRPCClientcCstdS)z0Override the base class - just re-raise EOFErrorN)EOFErrorrr'r'r( handle_EOFszMyRPCClient.handle_EOFN)rrrrr'r'r'r(rsrcCs^d|pdd}|t|krNt|t|d\}}||d||dS|ddSdS)zReturn width long restart line formatted with filename. Fill line with balanced '='s, with any extras and at least one at the beginning. Do not end with a trailing space. z = RESTART: ZShellz =rrmN)rdivmod)widthr%rZdivmodr'r'r( restart_lines  rc@seZdZddZdZdZdZddZddZdd Z d?d d Z ddZ ddZ ddZ ddZd@ddZdZddZdZddZddZddZd d!Zd"Zd#d$ZdAd%d&Zd'd(Zd)d*Zd+d,ZdBd-d.Zd/d0Zd1d2Zd3d4Z d5d6Z!d7d8Z"d9d:Z#d;d<Z$d=d>Z%dS)CModifiedInterpretercCsB||_tjdj}tj||dd|_d|_t|_ |j j j |_ dS)Nr)localsF) tkconsolesysmodules__dict__r rA restartingsubprocess_arglistPORTportcompilecompilerflagsoriginal_compiler_flags)r>rrr'r'r(rAs zModifiedInterpreter.__init__NcCs&|jdkr||_t|j|_dSr<)rbuild_subprocess_arglist subprocessPopen rpcsubprocrr'r'r(spawn_subprocesss  z$ModifiedInterpreter.spawn_subprocesscCs\|jdkstdddtjD}tjddddd d }d |f}tjg|d |t|jgS) Nrz/Socket should have been assigned a port number.cSsg|] }d|qS)z-Wr').0sr'r'r( sz@ModifiedInterpreter.build_subprocess_arglist..mainGeneralzdelete-exitfuncFbool)defaulttypez&__import__('idlelib.run').run.main(%r)-c)rAssertionErrorr warnoptionsr GetOption executableru)r>rlZ del_exitfZcommandr'r'r(rs   z,ModifiedInterpreter.build_subprocess_arglistc Cs\t|jf}tdD]8}t|zt||_WqXWqtk rHYqXq|dS|jj d|_t dkr|jj t jt jd||jj dz|jWn t jk r|YdSX|jd|j|jd|jj|jd|jj|jd|jj|jd |jj|jd t|jd ||jd d ||jS)Nrr rrrrrFr1r^Twith_cwd)HOSTrrtimesleeprrpccltr"display_port_binding_errorlistening_sock getsocknamer setsockoptsocket SOL_SOCKET SO_REUSEADDRr settimeoutaccepttimeoutdisplay_no_subprocess_errorregisterrrrrrFr1 transfer_pathpoll_subprocess)r>addrir'r'r(start_subprocesssB       z$ModifiedInterpreter.start_subprocessFrRcCs2|jr |jSd|_|}|rrr%r_rZ was_executingr'r'r(restart_subprocesssF     z&ModifiedInterpreter.restart_subprocesscCs|jdddidS)NexecZinterrupt_the_serverr')rZ remotecallrr'r'r(Z__request_interrupt sz'ModifiedInterpreter.__request_interruptcCstj|jddS)N)target) threadingThread'_ModifiedInterpreter__request_interruptstartrr'r'r(interrupt_subprocesssz(ModifiedInterpreter.interrupt_subprocesscCs~|jdk r|jj|jz|jjWntk r>YnXz|jWntk rbYnX|d|j_ d|_dS)NF) _afteridrrBZ after_cancelrrrr!rrrr'r'r(kill_subprocesss z#ModifiedInterpreter.kill_subprocesscCsPz|jWntk r$YdSXz|jWntk rJYdSXdS)z"Make sure subprocess is terminatedN)rkillr"waitrr'r'r(r!sz(ModifiedInterpreter.terminate_subprocesscCs2|rdg}|tjntj}|d|fdS)NrRzRif 1: import sys as _sys _sys.path = %r del _sys )extendrrI runcommand)r>rrIr'r'r(r.sz!ModifiedInterpreter.transfer_pathc Cs8|j}|dkrdSz|j|jdd}Wn4tttfk rZ|jjrJYdSd}|YnX|r|j d|_|\}}|jj }|dkr|dk rt t ||dnH|dkr|j dr|n*|dkrd}t ||tjdt |||dz|jWntk rYnX|jjs4|jj|jj|j|_dS) Ng?)rZOKrZ EXCEPTION<>ERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR: )rZ pollresponse active_seqrr"KeyboardInterruptrclosingr resetoutputrprintreprgetvarremote_stack_viewerr __stderr__ endexecutingr!rBafter pollintervalrr)r>ZcltresponsehowZwhatrerrmsgr'r'r(r=sD    z#ModifiedInterpreter.poll_subprocesscCs ||_dSr<r)r>rr'r'r( setdebuggereszModifiedInterpreter.setdebuggercCs|jSr<rrr'r'r(rhszModifiedInterpreter.getdebuggercCs|jjd|jdS)aInitiate the remote stack viewer from a separate thread. This method is called from the subprocess, and by returning from this method we allow the subprocess to unblock. After a bit the shell requests the subprocess to open the remote stack viewer which returns a static object looking at the last exception. It is queried through the RPC mechanism. i,N)rrBrr rr'r'r(open_remote_stack_viewerks z,ModifiedInterpreter.open_remote_stack_viewerc Csddlm}|jdddi}|dkr6|jjdS||j|}ddlm }m }t |jj}t }t |dd}|||dd } | jjd d d || jd|} | dS) Nr) debugobj_rrZ stackviewer)rF)ScrolledCanvasTreeNodeZnormalrT)bgZhighlightthicknessrZboth)expandfill)idlelibrr remotequeuerrwrbZStubObjectTreeItemZ idlelib.treerrZToplevelrrVrWframepackZcanvasr) r>rZoiditemrrrrXrTZscZnoder'r'r(r xs   z'ModifiedInterpreter.remote_stack_viewerrcCs||}|||dS)z1Like runsource() but assumes complete exec sourceN) stuffsourceexecfiler>sourcer%r'r'r( execsources zModifiedInterpreter.execsourcec Cs|dkrFt|.}|}trr%r$rzcoder'r'r(r"s&   zModifiedInterpreter.execfilecCs&||}t|tstt|||S)zBExtend base class method: Stuff the source in the line cache first)r! isinstancerurr runsourcer#r'r'r(r0s zModifiedInterpreter.runsourcecCs>d|j}|jd|_|d}t|dd||ftj|<|S)z"Stuff source in the filename cachez rrnr)gidsplitrr1r2)r>r$r%r{r'r'r(r!s    zModifiedInterpreter.stuffsourcecCs|d|fdS)z>Prepend sys.path with file's directory if not already includeda(if 1: _filename = %r import sys as _sys from os.path import dirname as _dirname _dir = _dirname(_filename) if not _dir in _sys.path: _sys.path.insert(0, _dir) del _filename, _sys, _dirname, _dir N)rr>r%r'r'r(prepend_syspathsz#ModifiedInterpreter.prepend_syspathc Cs|j}|j}|dddt\}}}t|ddp:|p:d}t|ddpJd}t|d dpZd } | d krl|d7}|dkrd | d} nd |d| df} ||| ||d || dS)zOverride Interactive Interpreter method: Use Colorizing Color the offending position instead of printing it and pointing at it with a caret. rrirmsgrRzr&roffsetrziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s N) rrBrhrexc_inforvZcolorize_syntax_errorrr r) r>r%rrBrvaluetbr5r&r6posr'r'r(r,s$ z#ModifiedInterpreter.showsyntaxerrorcCs6|j|t||jdr2|jdS)z1Extend base class method to reset output properlyrN)rrchecklinecacher showtracebackr open_stack_viewerrr'r'r(r<s    z!ModifiedInterpreter.showtracebackcCs>tj}t|D]&}|dd|dddkr||=qdS)Nrr/r0)r1r2r3keys)r>cr7r'r'r(r;sz"ModifiedInterpreter.checklinecachecCs@|jjr|dS|jr0|jdd|fin t||jdS)z*Run the code without invoking the debuggerrrr-r)rrdisplay_executing_dialogrrrr)r>r.r'r'r(rs zModifiedInterpreter.runcommandcCsN|jjr|j||j}zzT|j |sT|j dk rT|j dd|fi|_ n |rh| ||jn t||jWntk r|jjstjddd|jjdrq|nYn`trtd|jjd ||jn,|jjr d |j_td |jjd n|YnXW5tsHz|jWntk rFYnXXdS) Override base class methodNrr-zExit?zDo you want to exit altogether?Zyesrr z IDLE internal error in runcode()rFr)rrr^rr;rr(rr!beginexecutingrZ asyncqueuerrunrr SystemExitrrxZaskyesnorBr<r rcanceled)r>r.rr'r'r(r-sR      zModifiedInterpreter.runcodecCs|jj|S)rA)rrr )r>rr'r'r(r #szModifiedInterpreter.writecCstjdd|jjddS)NzPort Binding ErroraAIDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start without a subprocess and refer to Help/IDLE Help 'Running without a subprocess' for further details.r rxryrrBrr'r'r(r's z.ModifiedInterpreter.display_port_binding_errorcCstjdd|jjddS)NzSubprocess Connection ErrorzIDLE's subprocess didn't make connection. See the 'Startup failure' section of the IDLE doc, online at https://docs.python.org/3/library/idle.html#startup-failurer rGrr'r'r(r2s z/ModifiedInterpreter.display_no_subprocess_errorcCstjdd|jjddS)NzAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.r rGrr'r'r(r@:s z,ModifiedInterpreter.display_executing_dialog)FrR)F)N)N)&rrrrArrrrrrrrrrrrrrrrrrr r1r%r"r0r!r4r,r<r;rr-r rrr@r'r'r'r(rsF  + , &     . rcseZdZdedZeZeZddddddgZ e j d gZ d Z d d l mZdTddZddZd Zd Zd Zd Zd Zd ZddZddZdUddZddZdVddZddZddZd d!Zd"d#Zd$d%Z d&d'Z!d(d)Z"d*d+Z#d,Z$d-d.Z%d/d0Z&d1d2Z'd3d4Z(dWd5d6Z)d7d8Z*d9d:Z+d;d<Z,d=d>Z-d?d@Z.dXdAdBZ/dYdCdDZ0dZdEdFZ1dGdHZ2dIdJZ3dKdLZ4d[dNdOZ5fdPdQZ6fdRdSZ7Z8S)\rzPython z Shell)rZ_File)ZeditZ_Edit)r_Z_Debug)optionsZ_Options)ZwindowZ_Window)helpZ_Help)ZSqueeze<>Fr)HistoryNcCs$tr&|j}|dddkr&|ddt||_|dkrVt}t||t|}t ||ddd|_ d|_ t tdrtjnd|_|jd d |_|j|_|j}|jd d |d |j|d|j|d|j|d|j|d|j|d|j|d|jtr8|d|j|d|j| |}|d|j!tj"|_#tj$|_%tj&|_'ddl(m)}t*|d|j+|j,|_&t-|d|j+|j,|_"t-|d|j+d|_$t-|d|j+|j,|_.ts|j"t_"|j$t_$|j&t_&zddl/}|j0|_1Wntj2t_$YnX|3|j|_4d|_5dS)Nrrshell)rLZShe_llTps1rrnr/char)wrapz<>z<>z<>z<>z<><>rz<>z<>rJ)iomenurrrbackslashreplacer2)6r( menu_specsrarr^TkrwithdrawrrrAZusetabsZ indentwidthhasattrrrNsys_ps1r2Zprompt_last_linepromptrBZ configurerCenter_callbacklinefeed_callbackcancel_callback eof_callbackr=toggle_debuggertoggle_jit_stack_viewerview_restart_mark restart_shellZSqueezerZsqueeze_current_text_eventr save_stdoutr save_stderrr save_stdinrrRrencodingerrorsrrpydocZ plainpagerZpagerr rKhistoryr)r>rFmsrwrBZsqueezerrRrhr'r'r(rA^s      zPyShell.__init__cCs tjddS)NT)Z shell_only)rZ GetExtensionsrr'r'r(get_standard_extension_namessz$PyShell.get_standard_extension_namescCs|adSr<r)r>streamr'r'r(set_warning_streamszPyShell.set_warning_streamcCstSr<rlrr'r'r(get_warning_streamszPyShell.get_warning_streamcCsH|jr$tjdd|jd|dS|j}|r<|n|dS)NzDon't debug nowz*You can only toggle the debugger when idler rQ) rrxryrBset_debugger_indicatorr^rclose_debugger open_debugger)r>redbr'r'r(r_s  zPyShell.toggle_debuggercCs|j}|d| dS)NrQ)r^rZsetvarr>rsr'r'r(rps zPyShell.set_debugger_indicatorcCsdSr<r'rr'r'r(r`szPyShell.toggle_jit_stack_viewercCsh|j}|r\|jd||jjr8t|jj||j d|j |_ | | dS)Nz [DEBUG OFF] )r^rrrrrZclose_remote_debuggerrrr rYrZrrprtr'r'r(rqs   zPyShell.close_debuggercCsX|jjrt|jj|}n t|}|j||d|j|_ | | dS)Nz [DEBUG ON] ) r^rrZstart_remote_debuggerrZDebuggerrrrYrZrrp)r>Zdbg_guir'r'r(rrs    zPyShell.open_debuggercCs|d|_dS)Helper for ModifiedInterpreterTN)rrrr'r'r(rCszPyShell.beginexecutingcCsd|_d|_|dS)ruFN)rrFrrr'r'r(rszPyShell.endexecutingcCsD|jr&tjddd|jd}|dkr&dS|d|_d|_t|S)zExtend EditorWindow.close()zKill?z7Your program is still running! Do you want to kill it?okrBFcancelT) rrxZ askokcancelrBrrFrrr)r>rr'r'r(rsz PyShell.closecCsV|tr|j|jt_|jt_|j t_ d|_d|_ d|j _ d|_t|dS)zEExtend EditorWindow._close(), shut down debugger and execution serverN)rqr(r^rrcrrrdrrerrrFr]rirrrr'r'r(rs zPyShell._closecCsdS)z8Override EditorWindow method: never remove the colorizerTr'r3r'r'r(ispythonsource szPyShell.ispythonsourcecCs|jSr<) shell_titlerr'r'r( short_titleszPyShell.short_titlezHType "help", "copyright", "credits" or "license()" for more information.cCs|jdd|tr:d}|j}|sF|dSn d}tjt _| dt j t j |j |f|j|ddl}d|_dS) NrrarRFz==== No Subprocess ==== WARNING: Running IDLE without a Subprocess is deprecated and will be removed in a later version. See Help/IDLE Help for details. zPython %s on %s %s %srT)rBrrr(r^rrr displayhookrr versionplatform COPYRIGHTZ focus_forcertkinterZ _default_root)r>Znosubclientrr'r'r(rs$  z PyShell.begincCs|js dSd|_|jdSNT)reading_stop_readline_flagrquitrr'r'r(r,szPyShell.stop_readlinecCs|j}zd|_|jW5||_X|jr4d|_dS|jdd}t|dkrRd}||jrnd|_t snt |j r~d|_ d}|S)NTFrRrrrrn) rrmainlooprrBgetrrrFr(r endoffile)r>r6rr'r'r(readline2s( zPyShell.readlinecCsdSrr'rr'r'r(isattyIszPyShell.isattycCsz|jdddrWdSWn YnX|jsT|jsT||jd|dSd|_d|_ |jr|jj r|j r|j n |j |jr|jdS)N sel.firstz!=sel.lastzKeyboardInterrupt rQFT)rBrrrrr^r rrrFrrrrrrrr'r'r(r]Ls&       zPyShell.cancel_callbackcCsf|jr|jsdS|jdddr0|jddds4dS|jsL||nd|_d|_|j dS)Nrz==rarFTrQ) rrrBrrrrFrrrrr'r'r(r^bs   zPyShell.eof_callbackcCs0|jr"|jdd|jdn ||dS)NrarnrQ)rrBraseenewline_and_indent_eventrr'r'r(r\qs  zPyShell.linefeed_callbackcCs:|jr|jsdSz8|jdd}|rF|jdddrF|||WdSWn YnX|jdddrX|jd d}|r|jdd|d r||j|d |d |dS|jd d}|r|jd d |d r||j|d |d |dS|jdd}|r>|j|d ddr>||j|d d |n||jdd |dS|jdddrx|jdd|jdd}|r| s|j dd|jdddr| |dS|jdd|jr|j dd|j dn | ||jd dd|j|jr.|jn|dS)Nrrz<=rrQrariomark linestartrrrzinsert lineendz>=rrfrzend-1c linestartrn)rrrBrrrecallZ tag_prevrangeZ tag_nextrangerstriprrrarrYZupdate_idletasksrrrunit)r>reselprevnextindicesrr'r'r(r[zsZ       zPyShell.enter_callbackc Cs6tdd|}tdd|}|d}|jz|jddd|jdd |j d d}| d r| ||j d d}|j d|d t|d krtd|d d }td|d }|d dD]8}||r||t|d}|j dd| qW5|jd|jXdS)Nz^\s*\nrRz\n\s*$rnrarrirrrf:rrz ^([ \t]*))resubr2rBZundo_block_startrZundo_block_stoprhrrrstripendswithrrarrsearchgrouprs)r>rrer{prefixZorig_base_indentZnew_base_indentrr'r'r(rs*     zPyShell.recallcCs|jdd}t|}|dkr8||ddkr8|d}q|dkrX||ddkrX|d}|dkrz||ddkrz|d}qX|d|}|j|dS)Nrrrrz rn)rBrrr^r0)r>rrr'r'r(rs   z PyShell.runitcCs\|jjr|jSz tjWn tjdd|jdYdSXddlm }||j |j dS)NzNo stack tracez@There is no stack trace yet. (sys.last_traceback is not defined)r r) StackBrowser) r^rr rlast_tracebackrxryrBZidlelib.stackviewerrrwrF)r>rerr'r'r(r=s   zPyShell.open_stack_viewercCs|jd|jddS)Nrr)rBrrr'r'r(ras zPyShell.view_restart_markcCs|jjdddS)z&Callback for Run/Restart Shell Cntl-F6TrN)r^rrr'r'r(rbszPyShell.restart_shellcCs:||j|j|jdd||jdS)Nrar) rrr rZrBrset_line_and_columnrLZ reset_undorr'r'r(rs zPyShell.showpromptcCsP|jjj}t|ddd}d||}|ds:|d7}|jj d|ddS)NrMT)rtabsizeZ expand_tabsrnrr) r^rrrrJrPrZperZbottomra)r>r5rwrapperZ wrapped_msgr'r'r( show_warnings   zPyShell.show_warningcCsb|jdd}|jr |j||jddkr>|jdd|jdd||jdS)Nrrzend-2crn) rBrristorerarrZctipZremove_calltip_window)r>r$r'r'r(rs zPyShell.resetoutputr'cCsXz0|jddt|||d}|jddWnYnX|jrTd|_tsTt|S)NrrightrF)rBrrr rFr(r)r>rrcountr'r'r(r sz PyShell.writecs<z|jdddrWdSWntk r0YdSXtS)Nrrrdisabled)rBrrsuperrOr __class__r'r(rOs  zPyShell.rmenu_check_cutcs|jdddrdStS)Nrarrr)rBrrrPrrr'r(rP&szPyShell.rmenu_check_paste)N)N)N)N)N)N)N)r')9rrrr ryrrrrrUrrZallow_line_numbersZidlelib.historyrKrArkrrrFrrrrnror_rpr`rqrrrCrrrrxrzr~rrrrr]r^r\r[rrr=rarbrrrr rOrP __classcell__r'r'rr(rBsr   C      ?     rc Cs2|jdkr.dD]}||dd||dqdS)z6Make paste replace selection on x11. See issue #5124.Zx11)ZTextZEntryZSpinboxz <>z%catch {%W delete sel.first sel.last} N)Z_windowingsystemZ bind_class)rwclsr'r'r( fix_x11_paste,s  ra USAGE: idle [-deins] [-t title] [file]* idle [-dns] [-t title] (-c cmd | -r file) [arg]* idle [-dns] [-t title] - [arg]* -h print this help message and exit -n run IDLE without a subprocess (DEPRECATED, see Help/IDLE Help for details) The following options will override the IDLE 'settings' configuration: -e open an edit window -i open a shell window The following options imply -i and will open a shell: -c cmd run the command in a shell, or -r file run script from file -d enable the debugger -s run $IDLESTARTUP or $PYTHONSTARTUP before anything else -t title set title of shell window A default edit window will be bypassed when -c, -r, or - are used. [arg]* are passed to the command (-c) or script (-r) in sys.argv[1:]. Examples: idle Open an edit window or shell depending on IDLE's configuration. idle foo.py foobar.py Edit the files, also open a shell if configured to start with shell. idle -est "Baz" foo.py Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell window with the title "Baz". idle -c "import sys; print(sys.argv)" "foo" Open a shell window and run the command, passing "-c" in sys.argv[0] and "foo" in sys.argv[1]. idle -d -s -r foo.py "Hello World" Open a shell window, run a startup script, enable the debugger, and run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in sys.argv[1]. echo "import sys; print(sys.argv)" | idle - "foobar" Open a shell window, run the script piped in, passing '' in sys.argv[0] and "foobar" in sys.argv[1]. c sVddl}ddlm}ddlm}ddlm}tddad}d}d}d}d}d} z|tj ddd\} } WnD|j k r} z$t d | t ftj d td W5d} ~ XYnX| D]\} }| d kr|}d}| d krd}d}| dkrd}| dkr tjt t| dkrd}| dkr4t dtj d da| dkrh|}tj|rRnt d|td}| dkrzd} d}| dkr|t_d}q| r| ddkrtj}d}tttjD]}tjtj|tj|<q| r| ddkrdg| ddt_ n|rd g| t_ n|r0|g| t_ n| rd}g}| D]}|tj|qB|D],}tj|}|tjkr`tjd|q`n"t}|tjkrtjd|tj ddddd}|p|}|p| }tr|st!t"dda#t#$dd l%m&}|t#tj'tjt(d!|d"krPtj'd#}t#j)|d$nV|*st+d%krnd&d'}nd(d)}fd*d+|D}d,d+|D}t#j,d0|t-t#t.t#t/t#a0|1t#t0|r|s|s| ddD] }t02|dkr| 3|q| st04|rNt05}|s0dS|*rTt0j6rT|j78nt0j9}|rb|:| rtj;||s|r|j=?d/tj f|r|j=@|n|r.|j=A||j=>|n8|r.|Bt#}|r|C||D}|r.|C|t0jErBt#Fq.t#GtddS)1Nr)system)testing)macosxTFrz c:deihnr:st:z Error: %s %srrrz-dz-ez-hz-iz-nz: Warning: running IDLE without a subprocess is deprecated.z-rzNo script file: z-sz-t-rRrrzeditor-on-startupr)rZIdle)Z classNamerZIconsZWindowszidle.ico)rg333333!@z.png) 0z.gif)rrrcs"g|]}tjd|fqS)z idle_%d%s)rHrIrJ)rsizeextZicondirr'r(rszmain..cSsg|]}tt|dqS))Zmasterr)Z PhotoImagerw)riconfiler'r'r(rsZ IDLESTARTUPZ PYTHONSTARTUPzbif 1: import sys as _sys _sys.argv = %r del _sys )T)Hgetoptr}rrrrr.r(rargverrorr  usage_msgrexitrr rHrIr~rryrr'rrr)r\dirnameragetcwdrrZ NoDefaultRootrVrwrW idlelib.runr rJ__file__Z wm_iconbitmapZisAquaTk TkVersionZ wm_iconphotorrrrFZsetupApprqrgnewrGdictrlowerr]rrenvironrr^r"rr%r4ZtkVersionWarningrZpreferTabsPreferenceWarningZ inversedictrZdestroy)rrrrZ enable_shellZ enable_editr_cmdZscriptZstartupZoptsrNr5oarZpathxr%dirZ edit_startr rZsizesZ iconfilesZiconsrLZtkversionwarningZprefer_tabs_preference_warningr'rr(rms&                                   rF)NN)Prrrr ImportErrorr r rEr}ZctypesZPROCESS_SYSTEM_DPI_AWAREZOleDLLZSetProcessDpiAwarenessr!r"Ztkinter.messageboxZ messageboxrxrrVrwrWrr ryr.r r1rHZos.pathr rrrtextwraprrrr&r+Zidlelib.colorizerrZidlelib.configrrrrZidlelib.editorrrZidlelib.filelistrZidlelib.outwinrrrrrZ idlelib.undorrrrr)r*r. checkcacher8r9rrrZ RPCClientrrrrrrrr'r'r'r(s                  ?0m 66