JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў fc @s~ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZmZyddlTWn2ek reddejejdYnXddljZddlmZmZdd lmZdd l m!Z!dd l"m#Z#dd l$m%Z%dd l&m'Z'ddl(m)Z)ddl(m*Z*ddl(m+Z+ddl(m,Z,ddl(m-Z-dZ.dZ/eja0ddl1Z1e2ddZ3e2e2ddZ4e2a5ddZ6e6e7e2e j8ddZ9e9e _8GdddeZ:GdddeZ;Gd d!d!e!Z<Gd"d#d#e#Z=Gd$d%d%e*j>Z?Gd&d'd'eZ@Gd(d)d)e%ZAGd*d+d+e jBZCGd,d-d-eCZDGd.d/d/eCZEd0ZFd1d2ZGeHd3krpejId3ejId)>> N(uNoneuwarning_streamuwriteuidle_formatwarninguAttributeErroruOSError(umessageucategoryufilenameulinenoufileuline((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuidle_showwarning@s   uidle_showwarningcCsL|r*tdkrHtjatt_qHntdk rHtt_dandS(u>Replace warning.showwarning with idle_showwarning, or reverse.N(u_warnings_showwarninguNoneuwarningsu showwarninguidle_showwarning(ucapture((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyucapture_warningsSs    ucapture_warningscCs{tj}i}xNt|D]@}|dd|dddkr|j||| 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. Niu<>i(u linecacheucacheulistupopuupdate(ufilenameuorig_checkcacheucacheusaveukey((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuextended_linecache_checkcachebs $ uextended_linecache_checkcachecBs|EeZdZdZddZd$d%d&d'd(d)gZddZd#ddZd#ddZ ddZ ddZ ddZ ddZ dd Zd!d"Zd#S(*uPyShellEditorWindowu6Regular text edit window in IDLE, supports breakpointscGsg|_tj|||jjd|j|jjd|j|jjd|jjt j j t j d|_|jj|dd}|jj||jjr|jndS(Nu<>u<>u<>ubreakpoints.lstcSs|j|dS(N(urestore_file_breaks(uold_hookuself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyufilename_changed_hooks u;PyShellEditorWindow.__init__..filename_changed_hook(u breakpointsu EditorWindowu__init__utextubinduset_breakpoint_hereuclear_breakpoint_hereuflistu open_shelluosupathujoinuidleConfu GetUserCfgDirubreakpointPathuioufilename_change_hookuset_filename_change_hookufilenameurestore_file_breaks(uselfuargsufilename_changed_hook((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__init__|s    uPyShellEditorWindow.__init__uCutu<>urmenu_check_cutuCopyu<>urmenu_check_copyuPasteu <>urmenu_check_pasteuSet Breakpointu<>uClear Breakpointu<>cCs|j}|jj}|jdd|d|dy|jj|}Wn"tk rn|jj|YnXy&|jj j j }|j ||WnYnXdS(NuBREAKu%d.0i( utextuioufilenameutag_addu breakpointsuindexu ValueErroruappenduflistupyshelluinterpudebuggeruset_breakpoint_here(uselfulinenoutextufilenameuiudebug((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuset_breakpoints   u"PyShellEditorWindow.set_breakpointcCsU|j}|jj}|s)|jdStt|jd}|j|dS(Nuinsert(utextuioufilenameubelluintufloatuindexuset_breakpoint(uselfueventutextufilenameulineno((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuset_breakpoint_heres   u'PyShellEditorWindow.set_breakpoint_herecCs|j}|jj}|s)|jdStt|jd}y|jj|WnYnX|j dddy&|j j j j }|j||WnYnXdS(NuinsertuBREAKuinsert linestartuinsert lineend +1char(utextuioufilenameubelluintufloatuindexu breakpointsuremoveu tag_removeuflistupyshelluinterpudebuggeruclear_breakpoint_here(uselfueventutextufilenameulinenoudebug((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuclear_breakpoint_heres"    u)PyShellEditorWindow.clear_breakpoint_herec Cs|jr|j}|jj}|s2|jdSg|_|jddty#|jjj j }|j |WqYqXndS(NuBREAKu1.0( u breakpointsutextuioufilenameubellu tag_removeuENDuflistupyshelluinterpudebuggeruclear_file_breaks(uselfutextufilenameudebug((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuclear_file_breakss     u%PyShellEditorWindow.clear_file_breakscCsb|j}|jj}y+t|jd}|j}WdQXWntk rZg}YnXyt|jdv}x1|D])}|j|dsz|j|qzqzW|j |j}|r|j|dt |dnWdQXWnrtk r]}zRt |j dd sKd |j _tjddd d t |d |jnWYdd}~XnXdS(u#Save breakpoints when file is savedurNuwu=u ubreakpoint_error_displayedutitleu IDLE Errorumessageu$Unable to update breakpoint list: %suparentFT(u breakpointsuioufilenameuopenubreakpointPathu readlinesuOSErroru startswithuwriteuupdate_breakpointsustrugetattrurootuFalseuTrueubreakpoint_error_displayedu tkMessageBoxu showerrorutext(uselfubreaksufilenameufpulinesunew_fileulineuerr((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyustore_file_breakss.       ,  u%PyShellEditorWindow.store_file_breaksc Cs|jj|jdkr dS|jj}|dkr<dStjj|jrt |jd}|j }WdQXxe|D]Z}|j |drt |t |dd}x|D]}|j|qWqqWndS(Nuru=i(utextuupdateuiouNoneufilenameuosupathuisfileubreakpointPathuopenu readlinesu startswithuevalulenuset_breakpoint(uselfufilenameufpulinesulineubreakpoint_linenumbersubreakpoint_linenumber((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyurestore_file_breakss      u'PyShellEditorWindow.restore_file_breakscCs4|j}|jd}|j|}||_dS(u3Retrieves all the breakpoints in the current windowuBREAKN(utextu tag_rangesuranges_to_linenumbersu breakpoints(uselfutexturangesulinenumber_list((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuupdate_breakpointss u&PyShellEditorWindow.update_breakpointscCsg}xtdt|dD]f}tt||j}tt||dj}x'||kr|j||d7}q^WqW|S(Niii(urangeulenuintufloatustringuappend(uselfurangesulinesuindexulinenouend((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuranges_to_linenumberss u)PyShellEditorWindow.ranges_to_linenumberscCs|jtj|dS(u7Extend base method - clear breaks when module is closedN(uclear_file_breaksu EditorWindowu_close(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu_close(s uPyShellEditorWindow._closeN(uCutu<>urmenu_check_cut(uCopyu<>urmenu_check_copy(uPasteu <>urmenu_check_paste(NNN(uSet Breakpointu<>N(uClear Breakpointu<>N(u__name__u __module__u __qualname__u__doc__u__init__uNoneu rmenu_specsuset_breakpointuset_breakpoint_hereuclear_breakpoint_hereuclear_file_breaksustore_file_breaksurestore_file_breaksuupdate_breakpointsuranges_to_linenumbersu_close(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuPyShellEditorWindowys"      /   uPyShellEditorWindowcBs5|EeZdZdZeZdZdddZdS(uPyShellFileListu8Extend base class: IDLE supports a shell and breakpointscCsQ|jr|jjjn.t||_|jrJ|jjsJdSn|jS(N(upyshellutopuwakeupuPyShellubeginuNone(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu open_shell7s  uPyShellFileList.open_shellN( u__name__u __module__u __qualname__u__doc__uPyShellEditorWindowu EditorWindowuNoneupyshellu open_shell(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuPyShellFileList.suPyShellFileListcBsJ|EeZdZdZddZddZddZdd Zd S( uModifiedColorDelegatoru8Extend base class: colorizer for the shell window itselfcCstj||jdS(N(uColorDelegatoru__init__u LoadTagDefs(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__init__Es uModifiedColorDelegator.__init__cCs7|jddd|jdddtj|dS(NuTODOu1.0uiomarkuSYNC(u tag_removeutag_adduColorDelegatorurecolorize_main(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyurecolorize_mainIsu&ModifiedColorDelegator.recolorize_maincCstj|tjddd}|jjiidd6dd6d6tj|dd6tj|dd6tj|d d 6dS( NumainuThemeunameu backgroundu foregroundustdinustdoutustderruconsole(uColorDelegatoru LoadTagDefsuidleConfu GetOptionutagdefsuupdateuNoneu GetHighlight(uselfutheme((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu LoadTagDefsNs  u"ModifiedColorDelegator.LoadTagDefscCs+x$|jD]}|j|ddq WdS(Nuiomarkuend(utagdefsu tag_remove(uselfutag((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu removecolorsXsu#ModifiedColorDelegator.removecolorsN(u__name__u __module__u __qualname__u__doc__u__init__urecolorize_mainu LoadTagDefsu removecolors(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuModifiedColorDelegatorBs    uModifiedColorDelegatorcBs8|EeZdZdZdddZdddZdS(uModifiedUndoDelegatoru;Extend base class: forbid insert/delete before the I/O markc Cs\y-|jj|ddr,|jjdSWntk rAYnXtj||||dS(NuuModifiedInterpretercCsf||_tjdj}tj|d|d|_d|_ d|_ t |_ |j jj|_dS(Nu__main__ulocalsF(u tkconsoleusysumodulesu__dict__uInteractiveInterpreteru__init__uNoneusave_warnings_filtersuFalseu restartingusubprocess_arglistuPORTuportucompileucompileruflagsuoriginal_compiler_flags(uselfu tkconsoleulocals((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__init__|s     uModifiedInterpreter.__init__cCs:|jdkr!|j|_ntj|j|_dS(N(usubprocess_arglistuNoneubuild_subprocess_arglistu subprocessuPopenu rpcsubproc(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuspawn_subprocesssu$ModifiedInterpreter.spawn_subprocesscCs|jdkstdddtjD}tjdddddd d }td krnd |f}n d |f}tjg|d|t |jgS(Niu/Socket should have been assigned a port number.cSsg|]}d|qS(u-W((u.0us((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu s u@ModifiedInterpreter.build_subprocess_arglist..umainuGeneraludelete-exitfuncudefaultutypeubooluidlelib.PyShellu&__import__('idlelib.run').run.main(%r)u__import__('run').main(%r)u-cF( uportuAssertionErrorusysu warnoptionsuidleConfu GetOptionuFalseu__name__u executableustr(uselfuwu del_exitfucommand((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyubuild_subprocess_arglists   u,ModifiedInterpreter.build_subprocess_arglistcCst|jf}xntdD]R}tj|yt||_PWqtjk rm}zWYdd}~XqXqW|j dS|jj j d|_t dkr|jj jtjtjdn|j|jj jdy|jjWn6tjk r-}z|jdSWYdd}~XnX|jjd|j|jjd|jj|jjd|jj|jjd|jj|jjd |jj|jjd t|jjd ||jd d |j|jS(Niiii uconsoleustdinustdoutustderruflistu linecacheuinterpuwith_cwdT( uHOSTuporturangeutimeusleepu MyRPCClienturpccltusocketuerrorudisplay_port_binding_erroruNoneulistening_socku getsocknameuPORTu setsockoptu SOL_SOCKETu SO_REUSEADDRuspawn_subprocessu settimeoutuacceptutimeoutudisplay_no_subprocess_erroruregisteru tkconsoleustdinustdoutustderruflistu linecacheu transfer_pathuTrueupoll_subprocess(uselfuaddruiuerr((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyustart_subprocesss>      u$ModifiedInterpreter.start_subprocesscCs|jr|jSd |_|j}|rMytj|jWqMYqMXn|jj|j|j}|j }d |_ |j y|jj Wn6t jk r}z|jdSWYdd}~XnX|jd||j|jjdd|r |jd|jnt|jddd}|j|d||jjd d|jjd d |j|rtj|j}|jn|j|jj_ d |_|jS( Nuwith_cwduiomarkuend-1cu iiu=u RESTART urestartuleftTF(!u restartingurpccltuTrueu getdebuggeruRemoteDebuggeruclose_subprocess_debuggerucloseuterminate_subprocessu tkconsoleu executinguFalseuspawn_subprocessuacceptusocketutimeoutudisplay_no_subprocess_erroruNoneu transfer_pathu stop_readlineutextudeleteuwriteu showpromptuintuwidthumark_setu mark_gravityurestart_subprocess_debuggeruload_breakpointsuoriginal_compiler_flagsucompileucompileruflags(uselfuwith_cwdudebuguconsoleu was_executinguerruhalfbarugui((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyurestart_subprocesssJ                u&ModifiedInterpreter.restart_subprocesscCs|jjddfidS(Nuexecuinterrupt_the_server(urpccltu remotecall(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__request_interruptsu'ModifiedInterpreter.__request_interruptcCstjd|jjdS(Nutarget(u threadinguThreadu'_ModifiedInterpreter__request_interruptustart(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuinterrupt_subprocesssu(ModifiedInterpreter.interrupt_subprocesscCs|jdk r(|jjj|jny|jjjWntk rPYnXy|jjWntk rvYnX|j d|j_ d|_dS(NF( u_afteriduNoneu tkconsoleutextu after_cancelurpccltulistening_sockucloseuAttributeErroruterminate_subprocessuFalseu executing(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyukill_subprocesss    u#ModifiedInterpreter.kill_subprocesscCsXy|jjWntk r)dSYn+Xy|jjWntk rSdSYnXdS(u"Make sure subprocess is terminatedN(u rpcsubprocukilluOSErroruwait(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuterminate_subprocess s   u(ModifiedInterpreter.terminate_subprocesscCsC|r"dg}|jtjn tj}|jd|fdS(NuuRif 1: import sys as _sys _sys.path = %r del _sys (uextendusysupathu runcommand(uselfuwith_cwdupath((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu transfer_paths   u!ModifiedInterpreter.transfer_pathcCs|j}|dkrdSy|j|jdd}Wn;tttfk rr|jjr^dSd}|j YnX|rp|jj d|_|\}}|jj }|dkr|dk rGt t |d|qGnl|dkr |jjdrG|jqGn>|dkrGd}t ||dtjt ||d|ny|jjWqptk rlYqpXn|jjs|jjj|jj|j|_ndS( Nuwaitg?uOKufileu EXCEPTIONu<>uERRORu/PyShell.ModifiedInterpreter: Subprocess ERROR: (urpccltuNoneu pollresponseu active_sequEOFErroruOSErroruKeyboardInterruptu tkconsoleuclosingurestart_subprocessu resetoutputuconsoleuprintureprugetvaruremote_stack_viewerusysu __stderr__u endexecutinguAttributeErrorutextuafteru pollintervalupoll_subprocessu_afterid(uselfuclturesponseuhowuwhatuconsoleuerrmsg((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyupoll_subprocess(s@              u#ModifiedInterpreter.poll_subprocesscCs ||_dS(N(udebugger(uselfudebugger((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu setdebuggerPsuModifiedInterpreter.setdebuggercCs|jS(N(udebugger(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu getdebuggerSsuModifiedInterpreter.getdebuggercCs|jjjd|jdS(uInitiate 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(u tkconsoleutextuafteruremote_stack_viewer(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuopen_remote_stack_viewerVs u,ModifiedInterpreter.open_remote_stack_viewerc Csddlm}|jjdddi}|dkrK|jjjdS|j|j|}ddl m }m }t |jj}t jddd }t j|d d }||d |d d} | jjdddd|| jd|} | jdS(Ni(uRemoteObjectBrowseruexecu stackvieweruflist(uScrolledCanvasuTreeNodeumainuThemeunameunormalu backgroundubguhighlightthicknessuexpandiufilluboth(uflist(uidlelibuRemoteObjectBrowserurpccltu remotequeueuNoneu tkconsoleurootubelluStubObjectTreeItemuidlelib.TreeWidgetuScrolledCanvasuTreeNodeuTopleveluidleConfu GetOptionu GetHighlightuframeupackucanvasuexpand( uselfuRemoteObjectBrowseruoiduitemuScrolledCanvasuTreeNodeutoputhemeu backgrounduscunode((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuremote_stack_viewercs u'ModifiedInterpreter.remote_stack_viewericCs#|j|}|j||dS(u1Like runsource() but assumes complete exec sourceN(u stuffsourceuexecfile(uselfusourceufilename((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu execsourcevsuModifiedInterpreter.execsourcecCs|dkr3tj|}|j}WdQXnyt||d}Wnnttfk r|jj|jj }t dd|t dd|t j |||jj YnX|j|dS(uExecute an existing fileNuexecu *** Error in script or command! ufileu"Traceback (most recent call last):(uNoneutokenizeuopenureaducompileu OverflowErroru SyntaxErroru tkconsoleu resetoutputustderruprintuInteractiveInterpreterushowsyntaxerroru showprompturuncode(uselfufilenameusourceufpucodeutkerr((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuexecfile{s   uModifiedInterpreter.execfilec Cs|j|}d|_tjdd|_tjdddtt|tsYt zt j |||SWd|jdk r|jtjddiu i(ugidusplitulenu linecacheucache(uselfusourceufilenameulines((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu stuffsources  #uModifiedInterpreter.stuffsourcecCs|jd|fdS(u>Prepend sys.path with file's directory if not already includedu(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(u runcommand(uselfufilename((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuprepend_syspathsu#ModifiedInterpreter.prepend_syspathc Cs|j}|j}|jdddtj\}}}t|ddpU|pUd}t|ddpmd}t|d dpd } | d kr|d7}n|dkrd | d} nd |d| df} |j|| |j|jd ||j dS(uOverride Interactive Interpreter method: Use Colorizing Color the offending position instead of printing it and pointing at it with a caret. uERRORu1.0uendumsguuulinenoiuoffsetiuiomark + %d charsu&iomark linestart + %d lines + %d charsuSyntaxError: %s N( u tkconsoleutextu tag_removeusysuexc_infougetattrucolorize_syntax_erroru resetoutputuwriteu showprompt( uselfufilenameu tkconsoleutextutypeuvalueutbumsgulinenouoffsetupos((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyushowsyntaxerrors"      u#ModifiedInterpreter.showsyntaxerrorcCsJ|jj|jtj||jjdrF|jjndS(u1Extend base class method to reset output properlyu<>N(u tkconsoleu resetoutputuchecklinecacheuInteractiveInterpreteru showtracebackugetvaruopen_stack_viewer(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu showtracebacks    u!ModifiedInterpreter.showtracebackcCsXtj}xHt|jD]4}|dd|dddkr||=qqWdS(Niu<>i(u linecacheucacheulistukeys(uselfucukey((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuchecklinecaches $u"ModifiedInterpreter.checklinecachecCsV|jjr|jdS|jrB|jjdd|fint||jdS(u*Run the code without invoking the debuggeriuexecuruncodei(u tkconsoleu executingudisplay_executing_dialogurpccltu remotequeueuexeculocals(uselfucode((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu runcommands   uModifiedInterpreter.runcommandcCs|jjr|jjn|j|jdk rW|jtjddd?Z,d@dAZ-dBdCZ.dDdEZ/d^dFdGZ0d^dHdIZ1d^dJdKZ2dLdMZ3dNdOZ4fdPdQZ5fdRdSZ6fdTdUZ7S(`uPyShelluPython u Shellufileu_Fileueditu_Editudebugu_Debuguoptionsu_Optionsuwindowsu_Windowsuhelpu_Helpu_Windowii(uHistoryc Cstr9|j}|dddkr9|jddq9nt||_|dkrt}t||jt |}nt j ||ddd|_ d|_d|_|j}|jdd|jd|j|jd |j|jd |j|jd |j|jd |j|jd |j|jd|jtr~|jd|j|jd|jntj|_tj|_ tj!|_"ddl#m$}t%|d|j&|_!t'|d|j&|_t'|d|j&|_t'|d|j&|_(ts?|jt_|jt_|j!t_!nyddl)}|j*|_+Wntj,t_YnX|j-|j|_.d|_/dS(NiiushelluShe_lliuwrapucharu<>u<>u<>u<>u<>u<>u<>u<>u<>(u IOBindingustdinustdoutustderruconsolei2(ushelluShe_llT(0uuse_subprocessu menu_specsuinsertuModifiedInterpreteruinterpuNoneuTku fixwordbreaksuwithdrawuPyShellFileListu OutputWindowu__init__uTrueuusetabsu indentwidthucontext_use_ps1utextu configureubinduenter_callbackulinefeed_callbackucancel_callbacku eof_callbackuopen_stack_viewerutoggle_debuggerutoggle_jit_stack_vieweruview_restart_marku restart_shellusysustdoutu save_stdoutustderru save_stderrustdinu save_stdinuidlelibu IOBindinguPseudoInputFileuencodinguPseudoOutputFileuconsoleupydocu plainpagerupageru __stderr__uHistoryuhistoryu pollinterval(uselfuflistumsurootutextu IOBindingupydoc((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__init__Vs\                uPyShell.__init__cCstjddS(Nu shell_onlyT(uidleConfu GetExtensionsuTrue(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuget_standard_extension_namessu$PyShell.get_standard_extension_namescCs |adS(N(uwarning_stream(uselfustream((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuset_warning_streamsuPyShell.set_warning_streamcCstS(N(uwarning_stream(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuget_warning_streamsuPyShell.get_warning_streamcCs`|jr0tjddd|j|jdS|jj}|rR|jn |jdS(NuDon't debug nowu*You can only toggle the debugger when idleumasterubreak( u executingu tkMessageBoxu showerrorutextuset_debugger_indicatoruinterpu getdebuggeruclose_debuggeru open_debugger(uselfueventudb((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyutoggle_debuggers     uPyShell.toggle_debuggercCs%|jj}|jd| dS(Nu<>(uinterpu getdebuggerusetvar(uselfudb((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuset_debugger_indicatorsuPyShell.set_debugger_indicatorcCsdS(N((uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyutoggle_jit_stack_viewersuPyShell.toggle_jit_stack_viewercCs|jj}|r|jjd|j|jjrQtj|jjn|j|j j ddt _ |j n|jdS(Nu [DEBUG OFF] u>>> (uinterpu getdebuggeru setdebuggeruNoneucloseurpccltuRemoteDebuggeruclose_remote_debuggeru resetoutputuconsoleuwriteusysups1u showpromptuset_debugger_indicator(uselfudb((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuclose_debuggers     uPyShell.close_debuggercCsq|jjr'tj|jj|}ntj|}|jj||jdt_|j |j dS(Nu[DEBUG ON] >>> ( uinterpurpccltuRemoteDebuggerustart_remote_debuggeruDebuggeru setdebuggeruload_breakpointsusysups1u showpromptuset_debugger_indicator(uselfudbg_gui((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu open_debuggers     uPyShell.open_debuggercCs|jd|_dS(uHelper for ModifiedInterpreteriN(u resetoutputu executing(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyubeginexecutings uPyShell.beginexecutingcCs d|_d|_|jdS(uHelper for ModifiedInterpreteriN(u executingucanceledu showprompt(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu endexecutings  uPyShell.endexecutingcCsf|jr=tjddddd|j}|dkr=dSn|jd|_d|_t j |S( uExtend EditorWindow.close()uKill?u6The program is still running! Do you want to kill it?udefaultuokuparentucancelFT( u executingu tkMessageBoxu askokcancelutextuFalseu stop_readlineuTrueucanceleduclosingu EditorWindowuclose(uselfuresponse((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyucloses      u PyShell.closecCs||jtr |jjn|jt_|jt_|j t_ d|_d|_ d|j _d|_tj|dS(uEExtend EditorWindow._close(), shut down debugger and execution serverN(uclose_debuggeruuse_subprocessuinterpukill_subprocessu save_stdoutusysustdoutu save_stderrustderru save_stdinustdinuNoneuconsoleuflistupyshelluhistoryu EditorWindowu_close(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu_closes        uPyShell._closecCsdS(u8Override EditorWindow method: never remove the colorizerT(uTrue(uselfufilename((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuispythonsourcesuPyShell.ispythonsourcecCs|jS(N(u shell_title(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu short_titlesuPyShell.short_titleu@Type "copyright", "credits" or "license()" for more information.cCs|jjdd|jtrOd}|jj}|sa|jdSnd}tj t _ |j dt j t j |j|f|jddl}d|_dS( Nuiomarkuinsertuu==== No Subprocess ====uPython %s on %s %s %siFT(utextumark_setu resetoutputuuse_subprocessuinterpustart_subprocessucloseuFalseurpcu displayhookusysuwriteuversionuplatformu COPYRIGHTu showpromptutkinteruNoneu _default_rootuTrue(uselfunosubuclientutkinter((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyubegins        u PyShell.begincCs'|js dSd|_|jjdS(NT(ureadinguTrueu_stop_readline_flagutopuquit(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu stop_readlines  uPyShell.stop_readlinec Cs|j}zd|_|jjWd||_X|jrFd|_dS|jjdd}t|dkrvd}n|j|j rd|_ t st qn|j rd|_ d}n|S(Niuuiomarkuend-1ciu F( ureadingutopumainloopu_stop_readline_flaguFalseutextugetulenu resetoutputucanceleduuse_subprocessuKeyboardInterruptu endoffile(uselfusaveuline((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyureadlines(             uPyShell.readlinecCsdS(NT(uTrue(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuisatty4suPyShell.isattyc Csy |jjdddrdSWnYnX|jp:|jse|j|jjd|jdSd|_d|_ |jr|jj r|jj r|jj q|jj n|jr|jjndS(Nu sel.firstu!=usel.lastuKeyboardInterrupt ubreakii(utextucompareu executingureadingu resetoutputuinterpuwriteu showpromptu endoffileucanceledurpccltu getdebuggerurestart_subprocessuinterrupt_subprocessutopuquit(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyucancel_callback7s&     uPyShell.cancel_callbackcCs|jr|j rdS|jjdddoD|jjdddsKdS|jsk|j|jnd|_d|_|jj dS(Nuiomarku==uinsertuend-1ciiubreak( u executingureadingutextucompareu resetoutputucloseucanceledu endoffileutopuquit(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu eof_callbackMs      uPyShell.eof_callbackcCs@|jr/|jjdd|jjdn |j|dS(Nuinsertu ubreak(ureadingutextuinsertuseeunewline_and_indent_event(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyulinefeed_callback\s   uPyShell.linefeed_callbackcCs|jr|j rdSyN|jjdd}|rd|jjdddrd|j||dSnWnYnX|jjdddr|jjd d}|r|jjdd|d r|j|jj|d |d |dS|jjd d}|rL|jjd d |d rL|j|jj|d |d |dS|jjdd}|r|jj|d ddr|j|jj|d d |n|j|jjdd |dS|jjdddr|jjddn|jjdd}|r8|j r8|jj ddn|jjdddra|j |dS|jjdd|jr|jj dd|jj dn |j ||jjd dd|jj|jr|jjn |jdS(Nu sel.firstusel.lastu<=uiomarkubreakuinsertu=uconsoleuinsert linestartuend-1cuend-1c linestartu (u executingureadingutextugetucompareurecallu tag_prevrangeu tag_nextrangeumark_setustripudeleteunewline_and_indent_eventuinsertuseeutag_adduupdate_idletasksutopuquiturunit(uselfueventuseluprevunextuindicesus((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuenter_callbackesX "'"'&      uPyShell.enter_callbackc Cstjdd|}tjdd|}|jd}|jjzL|jjddd|jjdd |jjd d}|jj d r|j ||jjd d}n|jj d|d j t |d krtjd|d jd }tjd|jd }xd|d dD]O}|j|rm||t |d}n|jj dd|jq;WnWd|jjd|jjXdS(Nu^\s*\nuu\n\s*$u uselu1.0uenduinsertuend-1cuinsert linestartu:iiu ^([ \t]*)(ureusubusplitutextuundo_block_startu tag_removeumark_setugeturstripuendswithunewline_and_indent_eventuinsertustripulenusearchugroupu startswithuseeuundo_block_stop(uselfusueventulinesuprefixuorig_base_indentunew_base_indentuline((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyurecalls*  (uPyShell.recallcCs|jjdd}t|}x.|dkrQ||ddkrQ|d}q$W|dkr||ddkr|d}nx.|dkr||ddkr|d}qW|d|}|jj|}dS(Nuiomarkuend-1ciiu u (utextugetulenuinterpu runsource(uselfulineuiumore((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyurunits #  #u PyShell.runitc Csu|jjr|jjSy tjWn%tjddd|jdSYnXddlm }||j |j }dS(NuNo stack traceu@There is no stack trace yet. (sys.last_traceback is not defined)umasteri(u StackBrowser( uinterpurpcclturemote_stack_viewerusysulast_tracebacku tkMessageBoxu showerrorutextuidlelib.StackVieweru StackBrowserurootuflist(uselfueventu StackBrowserusv((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuopen_stack_viewers      uPyShell.open_stack_viewercCs$|jjd|jjddS(Nuiomarkurestart(utextusee(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuview_restart_marksuPyShell.view_restart_markcCs|jjdddS(u&Callback for Run/Restart Shell Cntl-F6uwith_cwdNT(uinterpurestart_subprocessuTrue(uselfuevent((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu restart_shellsuPyShell.restart_shellc Csl|jyttj}Wnd}YnX|jj||jjdd|j|j j dS(Nuuinsertuend-1c( u resetoutputustrusysups1uconsoleuwriteutextumark_setuset_line_and_columnuiou reset_undo(uselfus((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu showprompts   uPyShell.showpromptcCs|jjdd}|jr1|jj|n|jjddkr_|jjddn|jjdd|jdS(Nuiomarkuend-1cuend-2cu (utextugetuhistoryustoreuinsertumark_setuset_line_and_column(uselfusource((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu resetoutputs uPyShell.resetoutputc Cst|tryt|ryt|dkryx*t|D]\}}|dkr:Pq:q:Wtd|||ddnyB|jjddtj |||d}|jjddWn YnX|j rd|_ t st qn|S( Nu￿uUCS-2iu%Non-BMP character not supported in Tkuiomarkurightulefti( u isinstanceustrulenumaxu enumerateuUnicodeEncodeErrorutextu mark_gravityu OutputWindowuwriteucanceleduuse_subprocessuKeyboardInterrupt(uselfusutagsustartucharucount((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuwrites"-     u PyShell.writec sFy |jjdddrdSWntk r8dSYnXtjS(Nu sel.firstu(utags(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuname&suPseudoFile.namecCsdS(NT(uTrue(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuisatty*suPseudoFile.isattyN( u__name__u __module__u __qualname__uNoneu__init__upropertyuencodingunameuisatty(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu PseudoFilesu PseudoFilecBs,|EeZdZddZddZdS(uPseudoOutputFilecCsdS(NT(uTrue(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuwritable0suPseudoOutputFile.writablecCs}|jrtdnt|tk rgt|tsUtdt|jntj|}n|jj ||j S(Nuwrite to closed fileumust be str, not ( uclosedu ValueErrorutypeustru isinstanceu TypeErroru__name__u__str__ushelluwriteutags(uselfus((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuwrite3s uPseudoOutputFile.writeN(u__name__u __module__u __qualname__uwritableuwrite(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuPseudoOutputFile.s uPseudoOutputFilecBsY|EeZdZd ddZddZd ddZddd Zd d Zd S(uPseudoInputFilecCs#tj||||d|_dS(Nu(u PseudoFileu__init__u _line_buffer(uselfushellutagsuencoding((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu__init__@suPseudoInputFile.__init__cCsdS(NT(uTrue(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyureadableDsuPseudoInputFile.readableicCs|jrtdn|dkr-d}n+t|tsXtdt|jn|j}d|_|dkrx|j j }|sPn||7}qyn_x9t ||kr|j j }|sPn||7}qW||d|_|d|}|S(Nuread from closed fileiumust be int, not uii( uclosedu ValueErroruNoneu isinstanceuintu TypeErrorutypeu__name__u _line_bufferushellureadlineulen(uselfusizeuresultuline((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyureadGs,      uPseudoInputFile.readcCs|jrtdn|dkr-d}n+t|tsXtdt|jn|jpm|j j }|dkrt |}n|j dd|}|dkr|d}n||d|_|d|S(Nuread from closed fileiumust be int, not iu i( uclosedu ValueErroruNoneu isinstanceuintu TypeErrorutypeu__name__u _line_bufferushellureadlineulenufind(uselfusizeulineueol((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyureadline^s      uPseudoInputFile.readlinecCs|jjdS(N(ushelluclose(uself((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuclosensuPseudoInputFile.closeNii( u__name__u __module__u __qualname__uNoneu__init__ureadableureadureadlineuclose(u __locals__((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyuPseudoInputFile>s  uPseudoInputFileu 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 (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]. cstd+d+ad,}d,}d,}d}d}d,}y)tjtjddd\}}Wn_tjk r}z<tj j dt |tj j t tj dWYdd}~XnXx2|D]*\} } | dkr| }d+}n| dkrd+}d+}n| dkrd+}n| dkrFtjj t tj n| d kr[d+}n| d krpd,an| d kr| }tjj|rntd |tj d+}n| d krd+}d+}n| dkr| t_d+}qqW|r"|ddkr"tjj}d+}nx=tttjD]&} tjjtj| tj| |j:j<d)tjf|r|j:j=|qs|rs|j:j>||j:j;|qsn5|rst,j?t!}|rs|j:j<d*|qsnxt+j@rt!jAqvWt!jBtd,dS(.Niu c:deihnr:st:u Error: %s iu-cu-du-eu-hu-iu-nu-ruNo script file: u-su-tiu-uumainuGeneralueditor-on-startuputypeuboolu classNameuIdleuIconsuWindowsuidle.icoudefaultg!@g333333!@u.pngu.gifcs/g|]%}tjjd|fqS(u idle_%d%s(uosupathujoin(u.0usize(uextuicondir(u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu s umain..ii i0cSsg|]}td|qS(ufile(u PhotoImage(u.0uiconfile((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyu s u IDLESTARTUPu PYTHONSTARTUPubif 1: import sys as _sys _sys.argv = %r del _sys u print('%s')TF(ii i0(Cucapture_warningsuTrueuuse_subprocessuFalseuNoneugetoptusysuargvuerrorustderruwriteustru usage_msguexitustdoutuosupathuisfileuprintuPyShellu shell_titleustdinureadurangeulenuabspathuappendudirnameuinsertugetcwduidleConfu GetOptionuTkurootujoinu__file__usystemu wm_iconbitmapu TkVersionu wm_iconphotou fixwordbreaksuwithdrawuPyShellFileListuflistu macosxSupportusetupAppuopenuremoveunewu open_shellurunningAsOSXAppudictutopulowerupyshellu open_debuggeruenvironugetuinterpuexecfileu runcommandu execsourceuprepend_syspathutkVersionWarningu inversedictumainloopudestroy(u enable_shellu enable_editudebugucmduscriptustartupuoptsuargsumsguouauiupathxufilenameudiru edit_startuiconfileu iconfilesuiconsushellutkversionwarning((uextuicondiru4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyumains )                       $      !             umainu__main__(Kugetoptuosuos.pathureusocketu subprocessusysu threadingutimeutokenizeu tracebackutypesuiou linecacheucodeuInteractiveInterpreteruplatformupython_versionusystemutkinteru ImportErroruprintu __stderr__uexitutkinter.messageboxu messageboxu tkMessageBoxuidlelib.EditorWindowu EditorWindowu fixwordbreaksuidlelib.FileListuFileListuidlelib.ColorDelegatoruColorDelegatoruidlelib.UndoDelegatoru UndoDelegatoruidlelib.OutputWindowu OutputWindowuidlelib.configHandleruidleConfuidlelibuidleverurpcuDebuggeruRemoteDebuggeru macosxSupportuHOSTuPORTuwarning_streamuwarningsuNoneuidle_formatwarninguidle_showwarningu_warnings_showwarningucapture_warningsuTrueu checkcacheuextended_linecache_checkcacheuPyShellEditorWindowuPyShellFileListuModifiedColorDelegatoruModifiedUndoDelegatoru RPCClientu MyRPCClientuModifiedInterpreteruPyShellu TextIOBaseu PseudoFileuPseudoOutputFileuPseudoInputFileu usage_msgumainu__name__umodulesuFalse(((u4/opt/alt/python33/lib64/python3.3/idlelib/PyShell.pyus~                     g