§ \�dRãó°—dZddlZddlmZddlmZgd¢Zdad„Zd„Z Gd„d e¦«Z Gd „d ¦«Z e d krdd l mZeddd¬¦«dSdS)z0Editor window that can serve as an output file. éN)Ú messagebox)Ú EditorWindow)zfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):có(—d„tD¦«adS)z?Compile the patterns for matching to file name and line number.cóL—g|]!}tj|tj¦«‘Œ"S©)ÚreÚcompileÚ IGNORECASE)Ú.0Úpats ú..\python\lib\idlelib\outwin.pyú z!compile_progs..s6€ð2ð2ð2Øõ”z #¥r¤}Ñ5Ô5ð2ð2ð2óN)Úfile_line_patsÚfile_line_progsrrr Ú compile_progsrs$€ð2ð2Ý"0ð2ñ2ô2€O€O€OrcóV—tst¦«tD]h}| |¦«}|rO| dd¦«\}} t |¦«}| ¦«n#t $rYŒdwxYwŒidS |t|¦«fS#t$rYdSwxYw)a-Extract file name and line number from line of text. Check if line of text contains one of the file/line patterns. If it does and if the file and line are valid, return a tuple of the file name and line number. If it doesn't match or if the file or line is invalid, return None. ééN) rrÚsearchÚgroupÚopenÚcloseÚOSErrorÚintÚ TypeError)ÚlineÚprogÚmatchÚfilenameÚlinenoÚfs r Úfile_line_helperr#sÛ€õ ð݉ŒˆÝð ð ˆØ— ’ ˜DÑ!Ô!ˆØ ð Ø$Ÿ{š{¨1¨aÑ0Ô0Ñ ˆH�fð ݘ‘N”N�Ø—’‘ ” � Ø�øÝð ð ð Ø�ð øøøð  ðˆtðØ�˜V™œÐ$Ð$øÝ ððð؈tˆtðøøøs$Á#A5Á5 BÂB B B(Â'B(cóX—eZdZdZgd¢ZdZd„Zd„Zd„Zd„Z dd „Z d „Z d „Z d „Z dd„ZdS)Ú OutputWindowzÛAn editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilities. Adds binding to open a file at a line to the text widget. ))ÚCutz<>Úrmenu_check_cut)ÚCopyz<>Úrmenu_check_copy)ÚPastez <>Úrmenu_check_paste)NNN)zGo to file/lineú<>NFcój—tj|g|¢RŽ|j d|j¦«dS)Nr,)rÚ__init__ÚtextÚbindÚgoto_file_line)ÚselfÚargss r r.zOutputWindow.__init__Ns;€ÝÔ˜dÐ* TÐ*Ð*Ð*Ð*Ø Œ �ŠÐ+¨TÔ-@ÑAÔAÐAÐAÐArcó—dS)z6Python source is only part of output: do not colorize.Fr)r2r s r ÚispythonsourcezOutputWindow.ispythonsourceSs€àˆurcó—dS)zCustomize EditorWindow title.ÚOutputr©r2s r Ú short_titlezOutputWindow.short_titleWs€àˆxrcó2—| ¦«rdndS)z;Customize EditorWindow to not display save file messagebox.ÚyesÚno)Ú get_savedr8s r Ú maybesavezOutputWindow.maybesave[s€àŸšÑ(Ô(Ð2ˆuˆu¨dÐ2rrÚinsertcóì—t|t¦«sJ‚|j |||¦«|j |¦«|j ¦«t |¦«S)aæWrite text to text widget. The text is inserted at the given index with the provided tags. The text widget is then scrolled to make it visible and updated to display it, giving the effect of seeing each line as it is added. Args: s: Text to insert into text widget. tags: Tuple of tag strings to apply on the insert. mark: Index for the insert. Return: Length of text inserted. )Ú isinstanceÚstrr/r?ÚseeÚupdate_idletasksÚlen©r2ÚsÚtagsÚmarks r ÚwritezOutputWindow.write`sg€õ ˜!�SÑ!Ô!Ð!Ð!Ð!Ø Œ ×Ò˜˜q $Ñ'Ô'Ð'Ø Œ � Š �dÑÔÐØ Œ ×"Ò"Ñ$Ô$Ð$Ý�1‰vŒvˆ rcó:—|D]}| |¦«ŒdS)z"Write each item in lines iterable.N)rJ)r2Úlinesrs r Ú writelineszOutputWindow.writelinesvs0€àð ð ˆDØ �JŠJ�tÑ Ô Ð Ð ð ð rcó—dS)z8No flushing needed as write() directly writes to widget.Nrr8s r ÚflushzOutputWindow.flush{s€à ˆrcó(—tj|i|¤ŽdS©N)rÚ showerror)r2r3Úkwargss r rRzOutputWindow.showerrors€ÝÔ˜dÐ- fÐ-Ð-Ð-Ð-Ð-rNcó4—|j dd¦«}t|¦«}|sK|j dd¦«}t|¦«}|s| dd|j¬¦«dS|\}}|j ||¦«dS) aHandle request to open file/line. If the selected or previous line in the output window contains a file name and line number, then open that file name in a new window and position on the line number. Otherwise, display an error messagebox. zinsert linestartzinsert lineendzinsert -1line linestartzinsert -1line lineendzNo special linezTThe line you point at doesn't look like a valid file name followed by a line number.)ÚparentN)r/Úgetr#rRÚflistÚ gotofileline)r2ÚeventrÚresultr r!s r r1zOutputWindow.goto_file_line‚sº€ðŒy�}Š}Ð/Ð1AÑBÔBˆÝ! $Ñ'Ô'ˆØð ð”9—=’=Ð!:Ø!8ñ:ô:ˆDå% dÑ+Ô+ˆFØð Ø—’Ø%ðCàœ9ð ñ&ô&ð&ð �Ø!ш�&Ø Œ ×Ò ¨&Ñ1Ô1Ð1Ð1Ð1r)rr?rQ)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú rmenu_specsÚallow_code_contextr.r5r9r>rJrMrOrRr1rrr r%r%:sË€€€€€ððððð€KðÐðBðBðBð ðððððð3ð3ð3ð ðððð,ððð  ð ð ð.ð.ð.ð2ð2ð2ð2ð2ð2rr%có2—eZdZddiddidœZd„Zd„Zd„ZdS) ÚOnDemandOutputWindowÚ foregroundÚbluez#007700)ÚstdoutÚstderrcó"—||_d|_dSrQ)rWÚowin)r2rWs r r.zOnDemandOutputWindow.__init__§s€ØˆŒ ؈Œ ˆ ˆ rcót—|js| ¦«|j |||¦«dSrQ)rhÚsetuprJrFs r rJzOnDemandOutputWindow.write«s7€ØŒyð Ø �JŠJ‰LŒLˆLØ Œ �Š˜˜4 Ñ&Ô&Ð&Ð&Ð&rcóô—t|j¦«x|_}|j}|j ¦«D]\}}|r|j|fi|¤ŽŒ| d¦«|jj|_dS)NÚsel) r%rWrhr/ÚtagdefsÚitemsÚ tag_configureÚ tag_raiserJ)r2rhr/ÚtagÚcnfs r rjzOnDemandOutputWindow.setup°s…€Ý'¨¬ Ñ3Ô3Ð3ˆŒ �DØŒyˆØœ ×*Ò*Ñ,Ô,ð /ð /‰HˆC�Øð /Ø"�Ô" 3Ð.Ð.¨#Ð.Ð.Ð.øØ �Š�uÑÔÐØ”Y”_ˆŒ ˆ ˆ rN)r[r\r]rmr.rJrjrrr rbrbŸs_€€€€€ð! &Ð)Ø  )Ð,ðð€Gð ððð'ð'ð'ð %ð%ð%ð%ð%rrbÚ__main__)Úmainzidlelib.idle_test.test_outwinrF)Ú verbosityÚexit)r^rÚtkinterrÚidlelib.editorrrrrr#r%rbr[Úunittestrtrrr úrzsðððð € € € àÐÐÐÐÐà'Ð'Ð'Ð'Ð'Ð'ððð€ð€ð2ð2ð2ðððð8a2ða2ða2ða2ða2�<ña2ôa2ða2ðJ%ð%ð%ð%ð%ñ%ô%ð%ð4 ˆzÒÐØÐÐÐÐÐØ€DÐ (°A¸EÐBÑBÔBÐBÐBÐBðÐr