Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python37/lib64/python3.7/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/textview.cpython-37.pyc
B

� f��@s�dZddlmZmZmZmZmZmZmZm	Z	m
Z
mZmZddl
mZmZmZddlmZddlmZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�Zddd�Zddd�Zedkr�ddlmZedddd�ddlmZee�dS)zSimple text browser for IDLE

�)�Toplevel�Text�TclError�
HORIZONTAL�VERTICAL�NS�EW�NSEW�NONE�WORD�SUNKEN)�Frame�	Scrollbar�Button)�	showerror)�color_configcs0eZdZdZ�fdd�Zdd�Zdd�Z�ZS)�AutoHideScrollbarzpA scrollbar that is automatically hidden when not needed.

    Only the grid geometry manager is supported.
    cs<t|�dkst|�dkr"|��n|��t��||�dS)Ngg�?)�float�gridZgrid_remove�super�set)�self�lo�hi)�	__class__��5/opt/alt/python37/lib64/python3.7/idlelib/textview.pyrs
zAutoHideScrollbar.setcKst|jj�d���dS)Nz does not support "pack")rr�__name__)r�kwargsrrr�packszAutoHideScrollbar.packcKst|jj�d���dS)Nz does not support "place")rrr)rrrrr�placeszAutoHideScrollbar.place)r�
__module__�__qualname__�__doc__rrr �
__classcell__rr)rrrsrcs$eZdZdZef�fdd�	Z�ZS)�ScrollableTextFramezDisplay text with scrollbar(s).cs�t�j|f|�t||d�}|_|jddtd�|jddd�|jddd�t|t	d|j
d�|_|jjddtd�|jj
|d<|tkr�t|td|jd�|_|jjddtd�|jj
|d	<nd
|_d
S)a�Create a frame for Textview.

        master - master widget for this frame
        wrap - type of text wrapping to use ('word', 'char' or 'none')

        All parameters except for 'wrap' are passed to Frame.__init__().

        The Text widget is accessible via the 'text' attribute.

        Note: Changing the wrapping mode of the text widget after
        instantiation is not supported.
        )�wrapr)�row�columnZsticky�)ZweightF)Zorient�	takefocus�commandZyscrollcommandZxscrollcommandN)r�__init__r�textrr	Zgrid_rowconfigureZgrid_columnconfigurerrZyviewZyscrollrrr
rZxviewZxscrollr)rZmasterr&rr-)rrrr,"s"
zScrollableTextFrame.__init__)rr!r"r#r
r,r$rr)rrr%sr%cs,eZdZdZd�fdd�	Zd	dd�Z�ZS)
�	ViewFramez#Display TextFrame and Close button.�wordcs�t��|�||_|�d|j�|�d|j�t|tdd�|_|jj}|_|�	d|�|j
|ddd�t|�|��t
|d	|jd
d�|_}|jjdd
dd�|jdd�dS)aCreate a frame for viewing text with a "Close" button.

        parent - parent widget for this frame
        contents - text to display
        wrap - type of text wrapping to use ('word', 'char' or 'none')

        The Text widget is accessible via the 'text' attribute.
        z<Return>z<Escape>i�)ZreliefZheightz1.0rZdisabled)r&Zhighlightthickness�state�CloseF)r-r+r*�topT�both)�side�expand�fillZbottom)r4N)rr,�parentZbind�okr%rZ	textframer-�insertZ	configurerZ	focus_setr�	button_okr)rr7�contentsr&r-r:)rrrr,Js	zViewFrame.__init__NcCs|j��dS)zDismiss text viewer dialog.N)r7�destroy)r�eventrrrr8dszViewFrame.ok)r/)N)rr!r"r#r,r8r$rr)rrr.Hsr.cs8eZdZdZdefddd��fdd�Zd
dd	�Z�ZS)�
ViewWindowz%A simple text viewer dialog for IDLE.TF)�_htest�_utestcs�t��|�d|d<|��d}|��|s.dnd}	|�d|�d|	���|�|�t|||d�|_|�d|j	�t
|d	|j	d
d�|_}
|jjdd
dd�||_
|j
r�|�|�|��|s�|��dS)aShow the given text in a scrollable window with a 'close' button.

        If modal is left True, users cannot interact with other windows
        until the textview window is closed.

        parent - parent of this dialog
        title - string which is title of popup dialog
        contents - text to display in dialog
        wrap - type of text wrapping to use ('word', 'char' or 'none')
        _htest - bool; change box location when running htest.
        _utest - bool; don't wait_window when running unittest.
        �Zborderwidth�
�dz	=750x500+�+)r&ZWM_DELETE_WINDOWr1F)r-r+r*r2Tr3)r4r5r6N)rr,Zwinfo_rootxZwinfo_rootyZgeometry�titler.Z	viewframeZprotocolr8rr:r�is_modalZ	transientZgrab_setZwait_window)rr7rEr;�modalr&r?r@�x�yr:)rrrr,ls"

zViewWindow.__init__NcCs|jr|��|��dS)zDismiss text viewer dialog.N)rFZgrab_releaser<)rr=rrrr8�sz
ViewWindow.ok)N)rr!r"r#rr,r8r$rr)rrr>is"r>Tr/FcCst||||||d�S)a�Create text viewer for given text.

    parent - parent of this dialog
    title - string which is the title of popup dialog
    contents - text to display in this dialog
    wrap - type of text wrapping to use ('word', 'char' or 'none')
    modal - controls if users can interact with other windows while this
            dialog is displayed
    _utest - bool; controls wait_window on unittest
    )r&r@)r>)r7rEr;rGr&r@rrr�	view_text�srJc

Cs�y&t|d|d��}|��}WdQRXWn\tk
rPtdd|�d�|d�YnHtk
r�}	ztdt|	�|d�Wdd}	~	XYnXt||||||d	�SdS)
z�Create text viewer for text in filename.

    Return error message if file cannot be read.  Otherwise calls view_text
    with contents of the file.
    �r)�encodingNzFile Load ErrorzUnable to load file z .)rE�messager7zUnicode Decode Error)r&r@)�open�read�OSErrorr�UnicodeDecodeError�strrJ)
r7rE�filenamerLrGr&r@�filer;�errrrr�	view_file�s
rV�__main__)�mainzidlelib.idle_test.test_textview�)�	verbosity�exit)�runN)Tr/F)Tr/F) r#Ztkinterrrrrrrrr	r
rrZtkinter.ttkr
rrZtkinter.messageboxrZidlelib.colorizerrrr%r.r>rJrVrZunittestrXZidlelib.idle_test.htestr\rrrr�<module>s 4)!-


Name
Size
Permissions
Options
__init__.cpython-37.opt-1.pyc
0.501 KB
-rw-r--r--
__init__.cpython-37.opt-2.pyc
0.147 KB
-rw-r--r--
__init__.cpython-37.pyc
0.501 KB
-rw-r--r--
__main__.cpython-37.opt-1.pyc
0.268 KB
-rw-r--r--
__main__.cpython-37.opt-2.pyc
0.198 KB
-rw-r--r--
__main__.cpython-37.pyc
0.268 KB
-rw-r--r--
autocomplete.cpython-37.opt-1.pyc
6.637 KB
-rw-r--r--
autocomplete.cpython-37.opt-2.pyc
5.271 KB
-rw-r--r--
autocomplete.cpython-37.pyc
6.637 KB
-rw-r--r--
autocomplete_w.cpython-37.opt-1.pyc
10.773 KB
-rw-r--r--
autocomplete_w.cpython-37.opt-2.pyc
10.033 KB
-rw-r--r--
autocomplete_w.cpython-37.pyc
10.83 KB
-rw-r--r--
autoexpand.cpython-37.opt-1.pyc
2.76 KB
-rw-r--r--
autoexpand.cpython-37.opt-2.pyc
2.027 KB
-rw-r--r--
autoexpand.cpython-37.pyc
2.76 KB
-rw-r--r--
browser.cpython-37.opt-1.pyc
9.268 KB
-rw-r--r--
browser.cpython-37.opt-2.pyc
6.663 KB
-rw-r--r--
browser.cpython-37.pyc
9.268 KB
-rw-r--r--
calltip.cpython-37.opt-1.pyc
5.441 KB
-rw-r--r--
calltip.cpython-37.opt-2.pyc
3.858 KB
-rw-r--r--
calltip.cpython-37.pyc
5.441 KB
-rw-r--r--
calltip_w.cpython-37.opt-1.pyc
6.023 KB
-rw-r--r--
calltip_w.cpython-37.opt-2.pyc
5.112 KB
-rw-r--r--
calltip_w.cpython-37.pyc
6.023 KB
-rw-r--r--
codecontext.cpython-37.opt-1.pyc
8.491 KB
-rw-r--r--
codecontext.cpython-37.opt-2.pyc
5.566 KB
-rw-r--r--
codecontext.cpython-37.pyc
8.525 KB
-rw-r--r--
colorizer.cpython-37.opt-1.pyc
10.025 KB
-rw-r--r--
colorizer.cpython-37.opt-2.pyc
7.98 KB
-rw-r--r--
colorizer.cpython-37.pyc
10.025 KB
-rw-r--r--
config.cpython-37.opt-1.pyc
29.172 KB
-rw-r--r--
config.cpython-37.opt-2.pyc
19.484 KB
-rw-r--r--
config.cpython-37.pyc
29.172 KB
-rw-r--r--
config_key.cpython-37.opt-1.pyc
11.073 KB
-rw-r--r--
config_key.cpython-37.opt-2.pyc
9.687 KB
-rw-r--r--
config_key.cpython-37.pyc
11.073 KB
-rw-r--r--
configdialog.cpython-37.opt-1.pyc
76.771 KB
-rw-r--r--
configdialog.cpython-37.opt-2.pyc
47.32 KB
-rw-r--r--
configdialog.cpython-37.pyc
76.771 KB
-rw-r--r--
debugger.cpython-37.opt-1.pyc
13.886 KB
-rw-r--r--
debugger.cpython-37.opt-2.pyc
13.738 KB
-rw-r--r--
debugger.cpython-37.pyc
13.886 KB
-rw-r--r--
debugger_r.cpython-37.opt-1.pyc
13.448 KB
-rw-r--r--
debugger_r.cpython-37.opt-2.pyc
11.113 KB
-rw-r--r--
debugger_r.cpython-37.pyc
13.571 KB
-rw-r--r--
debugobj.cpython-37.opt-1.pyc
5.056 KB
-rw-r--r--
debugobj.cpython-37.opt-2.pyc
5.056 KB
-rw-r--r--
debugobj.cpython-37.pyc
5.056 KB
-rw-r--r--
debugobj_r.cpython-37.opt-1.pyc
1.971 KB
-rw-r--r--
debugobj_r.cpython-37.opt-2.pyc
1.971 KB
-rw-r--r--
debugobj_r.cpython-37.pyc
1.971 KB
-rw-r--r--
delegator.cpython-37.opt-1.pyc
1.25 KB
-rw-r--r--
delegator.cpython-37.opt-2.pyc
1.152 KB
-rw-r--r--
delegator.cpython-37.pyc
1.25 KB
-rw-r--r--
dynoption.cpython-37.opt-1.pyc
2.237 KB
-rw-r--r--
dynoption.cpython-37.opt-2.pyc
1.866 KB
-rw-r--r--
dynoption.cpython-37.pyc
2.237 KB
-rw-r--r--
editor.cpython-37.opt-1.pyc
45.513 KB
-rw-r--r--
editor.cpython-37.opt-2.pyc
43.657 KB
-rw-r--r--
editor.cpython-37.pyc
45.598 KB
-rw-r--r--
filelist.cpython-37.opt-1.pyc
3.297 KB
-rw-r--r--
filelist.cpython-37.opt-2.pyc
3.265 KB
-rw-r--r--
filelist.cpython-37.pyc
3.322 KB
-rw-r--r--
format.cpython-37.opt-1.pyc
13.125 KB
-rw-r--r--
format.cpython-37.opt-2.pyc
9.489 KB
-rw-r--r--
format.cpython-37.pyc
13.125 KB
-rw-r--r--
grep.cpython-37.opt-1.pyc
7.608 KB
-rw-r--r--
grep.cpython-37.opt-2.pyc
4.977 KB
-rw-r--r--
grep.cpython-37.pyc
7.608 KB
-rw-r--r--
help.cpython-37.opt-1.pyc
10.133 KB
-rw-r--r--
help.cpython-37.opt-2.pyc
7.429 KB
-rw-r--r--
help.cpython-37.pyc
10.174 KB
-rw-r--r--
help_about.cpython-37.opt-1.pyc
7.165 KB
-rw-r--r--
help_about.cpython-37.opt-2.pyc
6.069 KB
-rw-r--r--
help_about.cpython-37.pyc
7.165 KB
-rw-r--r--
history.cpython-37.opt-1.pyc
3.314 KB
-rw-r--r--
history.cpython-37.opt-2.pyc
2.118 KB
-rw-r--r--
history.cpython-37.pyc
3.314 KB
-rw-r--r--
hyperparser.cpython-37.opt-1.pyc
6.591 KB
-rw-r--r--
hyperparser.cpython-37.opt-2.pyc
5.314 KB
-rw-r--r--
hyperparser.cpython-37.pyc
6.591 KB
-rw-r--r--
idle.cpython-37.opt-1.pyc
0.331 KB
-rw-r--r--
idle.cpython-37.opt-2.pyc
0.331 KB
-rw-r--r--
idle.cpython-37.pyc
0.331 KB
-rw-r--r--
iomenu.cpython-37.opt-1.pyc
13.457 KB
-rw-r--r--
iomenu.cpython-37.opt-2.pyc
13 KB
-rw-r--r--
iomenu.cpython-37.pyc
13.457 KB
-rw-r--r--
macosx.cpython-37.opt-1.pyc
7.416 KB
-rw-r--r--
macosx.cpython-37.opt-2.pyc
5.285 KB
-rw-r--r--
macosx.cpython-37.pyc
7.416 KB
-rw-r--r--
mainmenu.cpython-37.opt-1.pyc
3.38 KB
-rw-r--r--
mainmenu.cpython-37.opt-2.pyc
2.92 KB
-rw-r--r--
mainmenu.cpython-37.pyc
3.38 KB
-rw-r--r--
multicall.cpython-37.opt-1.pyc
14.587 KB
-rw-r--r--
multicall.cpython-37.opt-2.pyc
12.277 KB
-rw-r--r--
multicall.cpython-37.pyc
14.643 KB
-rw-r--r--
outwin.cpython-37.opt-1.pyc
5.92 KB
-rw-r--r--
outwin.cpython-37.opt-2.pyc
4.275 KB
-rw-r--r--
outwin.cpython-37.pyc
5.92 KB
-rw-r--r--
parenmatch.cpython-37.opt-1.pyc
6.186 KB
-rw-r--r--
parenmatch.cpython-37.opt-2.pyc
4.676 KB
-rw-r--r--
parenmatch.cpython-37.pyc
6.186 KB
-rw-r--r--
pathbrowser.cpython-37.opt-1.pyc
3.655 KB
-rw-r--r--
pathbrowser.cpython-37.opt-2.pyc
3.518 KB
-rw-r--r--
pathbrowser.cpython-37.pyc
3.655 KB
-rw-r--r--
percolator.cpython-37.opt-1.pyc
3.434 KB
-rw-r--r--
percolator.cpython-37.opt-2.pyc
3.434 KB
-rw-r--r--
percolator.cpython-37.pyc
3.568 KB
-rw-r--r--
pyparse.cpython-37.opt-1.pyc
11.366 KB
-rw-r--r--
pyparse.cpython-37.opt-2.pyc
7.871 KB
-rw-r--r--
pyparse.cpython-37.pyc
11.707 KB
-rw-r--r--
pyshell.cpython-37.opt-1.pyc
41.261 KB
-rw-r--r--
pyshell.cpython-37.opt-2.pyc
38.597 KB
-rw-r--r--
pyshell.cpython-37.pyc
41.388 KB
-rw-r--r--
query.cpython-37.opt-1.pyc
12.515 KB
-rw-r--r--
query.cpython-37.opt-2.pyc
9.856 KB
-rw-r--r--
query.cpython-37.pyc
12.515 KB
-rw-r--r--
redirector.cpython-37.opt-1.pyc
6.604 KB
-rw-r--r--
redirector.cpython-37.opt-2.pyc
3.253 KB
-rw-r--r--
redirector.cpython-37.pyc
6.604 KB
-rw-r--r--
replace.cpython-37.opt-1.pyc
9.139 KB
-rw-r--r--
replace.cpython-37.opt-2.pyc
6.363 KB
-rw-r--r--
replace.cpython-37.pyc
9.139 KB
-rw-r--r--
rpc.cpython-37.opt-1.pyc
19.145 KB
-rw-r--r--
rpc.cpython-37.opt-2.pyc
15.682 KB
-rw-r--r--
rpc.cpython-37.pyc
19.229 KB
-rw-r--r--
run.cpython-37.opt-1.pyc
17.263 KB
-rw-r--r--
run.cpython-37.opt-2.pyc
14.846 KB
-rw-r--r--
run.cpython-37.pyc
17.31 KB
-rw-r--r--
runscript.cpython-37.opt-1.pyc
6.904 KB
-rw-r--r--
runscript.cpython-37.opt-2.pyc
5.699 KB
-rw-r--r--
runscript.cpython-37.pyc
6.904 KB
-rw-r--r--
scrolledlist.cpython-37.opt-1.pyc
5.276 KB
-rw-r--r--
scrolledlist.cpython-37.opt-2.pyc
5.276 KB
-rw-r--r--
scrolledlist.cpython-37.pyc
5.276 KB
-rw-r--r--
search.cpython-37.opt-1.pyc
5.792 KB
-rw-r--r--
search.cpython-37.opt-2.pyc
3.358 KB
-rw-r--r--
search.cpython-37.pyc
5.792 KB
-rw-r--r--
searchbase.cpython-37.opt-1.pyc
7.849 KB
-rw-r--r--
searchbase.cpython-37.opt-2.pyc
5.153 KB
-rw-r--r--
searchbase.cpython-37.pyc
7.849 KB
-rw-r--r--
searchengine.cpython-37.opt-1.pyc
6.681 KB
-rw-r--r--
searchengine.cpython-37.opt-2.pyc
5.069 KB
-rw-r--r--
searchengine.cpython-37.pyc
6.681 KB
-rw-r--r--
sidebar.cpython-37.opt-1.pyc
10.729 KB
-rw-r--r--
sidebar.cpython-37.opt-2.pyc
9.315 KB
-rw-r--r--
sidebar.cpython-37.pyc
10.729 KB
-rw-r--r--
squeezer.cpython-37.opt-1.pyc
9.297 KB
-rw-r--r--
squeezer.cpython-37.opt-2.pyc
6.185 KB
-rw-r--r--
squeezer.cpython-37.pyc
9.333 KB
-rw-r--r--
stackviewer.cpython-37.opt-1.pyc
4.936 KB
-rw-r--r--
stackviewer.cpython-37.opt-2.pyc
4.936 KB
-rw-r--r--
stackviewer.cpython-37.pyc
4.936 KB
-rw-r--r--
statusbar.cpython-37.opt-1.pyc
1.903 KB
-rw-r--r--
statusbar.cpython-37.opt-2.pyc
1.903 KB
-rw-r--r--
statusbar.cpython-37.pyc
1.903 KB
-rw-r--r--
textview.cpython-37.opt-1.pyc
6.899 KB
-rw-r--r--
textview.cpython-37.opt-2.pyc
4.794 KB
-rw-r--r--
textview.cpython-37.pyc
6.899 KB
-rw-r--r--
tooltip.cpython-37.opt-1.pyc
6.416 KB
-rw-r--r--
tooltip.cpython-37.opt-2.pyc
4.832 KB
-rw-r--r--
tooltip.cpython-37.pyc
6.416 KB
-rw-r--r--
tree.cpython-37.opt-1.pyc
15.328 KB
-rw-r--r--
tree.cpython-37.opt-2.pyc
14.016 KB
-rw-r--r--
tree.cpython-37.pyc
15.328 KB
-rw-r--r--
undo.cpython-37.opt-1.pyc
10.517 KB
-rw-r--r--
undo.cpython-37.opt-2.pyc
10.517 KB
-rw-r--r--
undo.cpython-37.pyc
10.517 KB
-rw-r--r--
window.cpython-37.opt-1.pyc
3.12 KB
-rw-r--r--
window.cpython-37.opt-2.pyc
3.12 KB
-rw-r--r--
window.cpython-37.pyc
3.12 KB
-rw-r--r--
zoomheight.cpython-37.opt-1.pyc
2.732 KB
-rw-r--r--
zoomheight.cpython-37.opt-2.pyc
2.685 KB
-rw-r--r--
zoomheight.cpython-37.pyc
2.732 KB
-rw-r--r--
zzdummy.cpython-37.opt-1.pyc
1.182 KB
-rw-r--r--
zzdummy.cpython-37.opt-2.pyc
1.115 KB
-rw-r--r--
zzdummy.cpython-37.pyc
1.182 KB
-rw-r--r--