SILENT KILLERPanel

Current Path: > > opt > alt > python37 > lib64 > python3.7 > idlelib > __pycache__ >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/

NameTypeSizeLast ModifiedActions
__init__.cpython-37.opt-1.pyc File 513 bytes April 17 2024 17:36:09.
__init__.cpython-37.opt-2.pyc File 151 bytes April 17 2024 17:35:53.
__init__.cpython-37.pyc File 513 bytes April 17 2024 17:36:15.
__main__.cpython-37.opt-1.pyc File 274 bytes April 17 2024 17:36:09.
__main__.cpython-37.opt-2.pyc File 203 bytes April 17 2024 17:35:53.
__main__.cpython-37.pyc File 274 bytes April 17 2024 17:36:15.
autocomplete.cpython-37.opt-1.pyc File 6796 bytes April 17 2024 17:36:09.
autocomplete.cpython-37.opt-2.pyc File 5398 bytes April 17 2024 17:35:53.
autocomplete.cpython-37.pyc File 6796 bytes April 17 2024 17:36:15.
autocomplete_w.cpython-37.opt-1.pyc File 11032 bytes April 17 2024 17:36:09.
autocomplete_w.cpython-37.opt-2.pyc File 10274 bytes April 17 2024 17:35:53.
autocomplete_w.cpython-37.pyc File 11090 bytes April 17 2024 17:36:15.
autoexpand.cpython-37.opt-1.pyc File 2826 bytes April 17 2024 17:36:09.
autoexpand.cpython-37.opt-2.pyc File 2076 bytes April 17 2024 17:35:53.
autoexpand.cpython-37.pyc File 2826 bytes April 17 2024 17:36:15.
browser.cpython-37.opt-1.pyc File 9490 bytes April 17 2024 17:36:09.
browser.cpython-37.opt-2.pyc File 6823 bytes April 17 2024 17:35:53.
browser.cpython-37.pyc File 9490 bytes April 17 2024 17:36:15.
calltip.cpython-37.opt-1.pyc File 5572 bytes April 17 2024 17:36:09.
calltip.cpython-37.opt-2.pyc File 3951 bytes April 17 2024 17:35:53.
calltip.cpython-37.pyc File 5572 bytes April 17 2024 17:36:15.
calltip_w.cpython-37.opt-1.pyc File 6168 bytes April 17 2024 17:36:09.
calltip_w.cpython-37.opt-2.pyc File 5235 bytes April 17 2024 17:35:53.
calltip_w.cpython-37.pyc File 6168 bytes April 17 2024 17:36:15.
codecontext.cpython-37.opt-1.pyc File 8695 bytes April 17 2024 17:36:09.
codecontext.cpython-37.opt-2.pyc File 5700 bytes April 17 2024 17:35:53.
codecontext.cpython-37.pyc File 8730 bytes April 17 2024 17:36:15.
colorizer.cpython-37.opt-1.pyc File 10266 bytes April 17 2024 17:36:09.
colorizer.cpython-37.opt-2.pyc File 8172 bytes April 17 2024 17:35:53.
colorizer.cpython-37.pyc File 10266 bytes April 17 2024 17:36:15.
config.cpython-37.opt-1.pyc File 29872 bytes April 17 2024 17:36:09.
config.cpython-37.opt-2.pyc File 19952 bytes April 17 2024 17:35:53.
config.cpython-37.pyc File 29872 bytes April 17 2024 17:36:15.
config_key.cpython-37.opt-1.pyc File 11339 bytes April 17 2024 17:36:09.
config_key.cpython-37.opt-2.pyc File 9919 bytes April 17 2024 17:35:53.
config_key.cpython-37.pyc File 11339 bytes April 17 2024 17:36:15.
configdialog.cpython-37.opt-1.pyc File 78613 bytes April 17 2024 17:36:09.
configdialog.cpython-37.opt-2.pyc File 48456 bytes April 17 2024 17:35:53.
configdialog.cpython-37.pyc File 78613 bytes April 17 2024 17:36:15.
debugger.cpython-37.opt-1.pyc File 14219 bytes April 17 2024 17:36:09.
debugger.cpython-37.opt-2.pyc File 14068 bytes April 17 2024 17:35:53.
debugger.cpython-37.pyc File 14219 bytes April 17 2024 17:36:15.
debugger_r.cpython-37.opt-1.pyc File 13771 bytes April 17 2024 17:36:09.
debugger_r.cpython-37.opt-2.pyc File 11380 bytes April 17 2024 17:35:53.
debugger_r.cpython-37.pyc File 13897 bytes April 17 2024 17:36:15.
debugobj.cpython-37.opt-1.pyc File 5177 bytes April 17 2024 17:36:09.
debugobj.cpython-37.opt-2.pyc File 5177 bytes April 17 2024 17:35:53.
debugobj.cpython-37.pyc File 5177 bytes April 17 2024 17:36:15.
debugobj_r.cpython-37.opt-1.pyc File 2018 bytes April 17 2024 17:36:09.
debugobj_r.cpython-37.opt-2.pyc File 2018 bytes April 17 2024 17:35:53.
debugobj_r.cpython-37.pyc File 2018 bytes April 17 2024 17:36:15.
delegator.cpython-37.opt-1.pyc File 1280 bytes April 17 2024 17:36:09.
delegator.cpython-37.opt-2.pyc File 1180 bytes April 17 2024 17:35:53.
delegator.cpython-37.pyc File 1280 bytes April 17 2024 17:36:15.
dynoption.cpython-37.opt-1.pyc File 2291 bytes April 17 2024 17:36:09.
dynoption.cpython-37.opt-2.pyc File 1911 bytes April 17 2024 17:35:53.
dynoption.cpython-37.pyc File 2291 bytes April 17 2024 17:36:15.
editor.cpython-37.opt-1.pyc File 46605 bytes April 17 2024 17:36:09.
editor.cpython-37.opt-2.pyc File 44705 bytes April 17 2024 17:35:53.
editor.cpython-37.pyc File 46692 bytes April 17 2024 17:36:15.
filelist.cpython-37.opt-1.pyc File 3376 bytes April 17 2024 17:36:09.
filelist.cpython-37.opt-2.pyc File 3343 bytes April 17 2024 17:35:53.
filelist.cpython-37.pyc File 3402 bytes April 17 2024 17:36:15.
format.cpython-37.opt-1.pyc File 13440 bytes April 17 2024 17:36:09.
format.cpython-37.opt-2.pyc File 9717 bytes April 17 2024 17:35:53.
format.cpython-37.pyc File 13440 bytes April 17 2024 17:36:15.
grep.cpython-37.opt-1.pyc File 7791 bytes April 17 2024 17:36:09.
grep.cpython-37.opt-2.pyc File 5096 bytes April 17 2024 17:35:53.
grep.cpython-37.pyc File 7791 bytes April 17 2024 17:36:15.
help.cpython-37.opt-1.pyc File 10376 bytes April 17 2024 17:36:09.
help.cpython-37.opt-2.pyc File 7607 bytes April 17 2024 17:35:53.
help.cpython-37.pyc File 10418 bytes April 17 2024 17:36:15.
help_about.cpython-37.opt-1.pyc File 7337 bytes April 17 2024 17:36:09.
help_about.cpython-37.opt-2.pyc File 6215 bytes April 17 2024 17:35:53.
help_about.cpython-37.pyc File 7337 bytes April 17 2024 17:36:15.
history.cpython-37.opt-1.pyc File 3394 bytes April 17 2024 17:36:09.
history.cpython-37.opt-2.pyc File 2169 bytes April 17 2024 17:35:53.
history.cpython-37.pyc File 3394 bytes April 17 2024 17:36:15.
hyperparser.cpython-37.opt-1.pyc File 6749 bytes April 17 2024 17:36:09.
hyperparser.cpython-37.opt-2.pyc File 5442 bytes April 17 2024 17:35:53.
hyperparser.cpython-37.pyc File 6749 bytes April 17 2024 17:36:15.
idle.cpython-37.opt-1.pyc File 339 bytes April 17 2024 17:36:09.
idle.cpython-37.opt-2.pyc File 339 bytes April 17 2024 17:35:53.
idle.cpython-37.pyc File 339 bytes April 17 2024 17:36:15.
iomenu.cpython-37.opt-1.pyc File 13780 bytes April 17 2024 17:36:09.
iomenu.cpython-37.opt-2.pyc File 13312 bytes April 17 2024 17:35:53.
iomenu.cpython-37.pyc File 13780 bytes April 17 2024 17:36:15.
macosx.cpython-37.opt-1.pyc File 7594 bytes April 17 2024 17:36:09.
macosx.cpython-37.opt-2.pyc File 5412 bytes April 17 2024 17:35:53.
macosx.cpython-37.pyc File 7594 bytes April 17 2024 17:36:15.
mainmenu.cpython-37.opt-1.pyc File 3461 bytes April 17 2024 17:36:09.
mainmenu.cpython-37.opt-2.pyc File 2990 bytes April 17 2024 17:35:53.
mainmenu.cpython-37.pyc File 3461 bytes April 17 2024 17:36:15.
multicall.cpython-37.opt-1.pyc File 14937 bytes April 17 2024 17:36:09.
multicall.cpython-37.opt-2.pyc File 12572 bytes April 17 2024 17:35:53.
multicall.cpython-37.pyc File 14994 bytes April 17 2024 17:36:15.
outwin.cpython-37.opt-1.pyc File 6062 bytes April 17 2024 17:36:09.
outwin.cpython-37.opt-2.pyc File 4378 bytes April 17 2024 17:35:53.
outwin.cpython-37.pyc File 6062 bytes April 17 2024 17:36:15.
parenmatch.cpython-37.opt-1.pyc File 6334 bytes April 17 2024 17:36:09.
parenmatch.cpython-37.opt-2.pyc File 4788 bytes April 17 2024 17:35:53.
parenmatch.cpython-37.pyc File 6334 bytes April 17 2024 17:36:15.
pathbrowser.cpython-37.opt-1.pyc File 3743 bytes April 17 2024 17:36:09.
pathbrowser.cpython-37.opt-2.pyc File 3602 bytes April 17 2024 17:35:53.
pathbrowser.cpython-37.pyc File 3743 bytes April 17 2024 17:36:15.
percolator.cpython-37.opt-1.pyc File 3516 bytes April 17 2024 17:36:09.
percolator.cpython-37.opt-2.pyc File 3516 bytes April 17 2024 17:35:53.
percolator.cpython-37.pyc File 3654 bytes April 17 2024 17:36:15.
pyparse.cpython-37.opt-1.pyc File 11639 bytes April 17 2024 17:36:09.
pyparse.cpython-37.opt-2.pyc File 8060 bytes April 17 2024 17:35:53.
pyparse.cpython-37.pyc File 11988 bytes April 17 2024 17:36:15.
pyshell.cpython-37.opt-1.pyc File 42251 bytes April 17 2024 17:36:09.
pyshell.cpython-37.opt-2.pyc File 39523 bytes April 17 2024 17:35:53.
pyshell.cpython-37.pyc File 42381 bytes April 17 2024 17:36:15.
query.cpython-37.opt-1.pyc File 12815 bytes April 17 2024 17:36:09.
query.cpython-37.opt-2.pyc File 10093 bytes April 17 2024 17:35:53.
query.cpython-37.pyc File 12815 bytes April 17 2024 17:36:15.
redirector.cpython-37.opt-1.pyc File 6763 bytes April 17 2024 17:36:09.
redirector.cpython-37.opt-2.pyc File 3331 bytes April 17 2024 17:35:53.
redirector.cpython-37.pyc File 6763 bytes April 17 2024 17:36:15.
replace.cpython-37.opt-1.pyc File 9358 bytes April 17 2024 17:36:09.
replace.cpython-37.opt-2.pyc File 6516 bytes April 17 2024 17:35:53.
replace.cpython-37.pyc File 9358 bytes April 17 2024 17:36:15.
rpc.cpython-37.opt-1.pyc File 19604 bytes April 17 2024 17:36:09.
rpc.cpython-37.opt-2.pyc File 16058 bytes April 17 2024 17:35:53.
rpc.cpython-37.pyc File 19691 bytes April 17 2024 17:36:15.
run.cpython-37.opt-1.pyc File 17677 bytes April 17 2024 17:36:09.
run.cpython-37.opt-2.pyc File 15202 bytes April 17 2024 17:35:53.
run.cpython-37.pyc File 17725 bytes April 17 2024 17:36:15.
runscript.cpython-37.opt-1.pyc File 7070 bytes April 17 2024 17:36:09.
runscript.cpython-37.opt-2.pyc File 5836 bytes April 17 2024 17:35:53.
runscript.cpython-37.pyc File 7070 bytes April 17 2024 17:36:15.
scrolledlist.cpython-37.opt-1.pyc File 5403 bytes April 17 2024 17:36:09.
scrolledlist.cpython-37.opt-2.pyc File 5403 bytes April 17 2024 17:35:53.
scrolledlist.cpython-37.pyc File 5403 bytes April 17 2024 17:36:15.
search.cpython-37.opt-1.pyc File 5931 bytes April 17 2024 17:36:09.
search.cpython-37.opt-2.pyc File 3439 bytes April 17 2024 17:35:53.
search.cpython-37.pyc File 5931 bytes April 17 2024 17:36:15.
searchbase.cpython-37.opt-1.pyc File 8037 bytes April 17 2024 17:36:09.
searchbase.cpython-37.opt-2.pyc File 5277 bytes April 17 2024 17:35:53.
searchbase.cpython-37.pyc File 8037 bytes April 17 2024 17:36:15.
searchengine.cpython-37.opt-1.pyc File 6841 bytes April 17 2024 17:36:09.
searchengine.cpython-37.opt-2.pyc File 5191 bytes April 17 2024 17:35:53.
searchengine.cpython-37.pyc File 6841 bytes April 17 2024 17:36:15.
sidebar.cpython-37.opt-1.pyc File 10987 bytes April 17 2024 17:36:09.
sidebar.cpython-37.opt-2.pyc File 9539 bytes April 17 2024 17:35:53.
sidebar.cpython-37.pyc File 10987 bytes April 17 2024 17:36:15.
squeezer.cpython-37.opt-1.pyc File 9520 bytes April 17 2024 17:36:09.
squeezer.cpython-37.opt-2.pyc File 6333 bytes April 17 2024 17:35:53.
squeezer.cpython-37.pyc File 9557 bytes April 17 2024 17:36:15.
stackviewer.cpython-37.opt-1.pyc File 5054 bytes April 17 2024 17:36:09.
stackviewer.cpython-37.opt-2.pyc File 5054 bytes April 17 2024 17:35:53.
stackviewer.cpython-37.pyc File 5054 bytes April 17 2024 17:36:15.
statusbar.cpython-37.opt-1.pyc File 1949 bytes April 17 2024 17:36:09.
statusbar.cpython-37.opt-2.pyc File 1949 bytes April 17 2024 17:35:53.
statusbar.cpython-37.pyc File 1949 bytes April 17 2024 17:36:15.
textview.cpython-37.opt-1.pyc File 7065 bytes April 17 2024 17:36:09.
textview.cpython-37.opt-2.pyc File 4909 bytes April 17 2024 17:35:53.
textview.cpython-37.pyc File 7065 bytes April 17 2024 17:36:15.
tooltip.cpython-37.opt-1.pyc File 6570 bytes April 17 2024 17:36:09.
tooltip.cpython-37.opt-2.pyc File 4948 bytes April 17 2024 17:35:53.
tooltip.cpython-37.pyc File 6570 bytes April 17 2024 17:36:15.
tree.cpython-37.opt-1.pyc File 15696 bytes April 17 2024 17:36:09.
tree.cpython-37.opt-2.pyc File 14352 bytes April 17 2024 17:35:53.
tree.cpython-37.pyc File 15696 bytes April 17 2024 17:36:15.
undo.cpython-37.opt-1.pyc File 10769 bytes April 17 2024 17:36:09.
undo.cpython-37.opt-2.pyc File 10769 bytes April 17 2024 17:35:53.
undo.cpython-37.pyc File 10769 bytes April 17 2024 17:36:15.
window.cpython-37.opt-1.pyc File 3195 bytes April 17 2024 17:36:09.
window.cpython-37.opt-2.pyc File 3195 bytes April 17 2024 17:35:53.
window.cpython-37.pyc File 3195 bytes April 17 2024 17:36:15.
zoomheight.cpython-37.opt-1.pyc File 2798 bytes April 17 2024 17:36:09.
zoomheight.cpython-37.opt-2.pyc File 2749 bytes April 17 2024 17:35:53.
zoomheight.cpython-37.pyc File 2798 bytes April 17 2024 17:36:15.
zzdummy.cpython-37.opt-1.pyc File 1210 bytes April 17 2024 17:36:09.
zzdummy.cpython-37.opt-2.pyc File 1142 bytes April 17 2024 17:35:53.
zzdummy.cpython-37.pyc File 1210 bytes April 17 2024 17:36:15.

Reading File: //opt/alt/python37/lib64/python3.7/idlelib/__pycache__//query.cpython-37.pyc

B

� f2:�@s dZddlZddlZddlZddlmZmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZmZmZmZddlmZddlmZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�Zedk�rddlmZedddd�ddl m!Z!e!eee�dS)a|
Dialogs that query users and verify the answer before accepting.

Query is the generic base class for a popup dialog.
The user must either enter a valid answer or close the dialog.
Entries are validated when <Return> is entered or [Ok] is clicked.
Entries are ignored when [Cancel] or [X] are clicked.
The 'return value' is .result set to either a valid answer or None.

Subclass SectionName gets a name for a new config file section.
Configdialog uses it for new highlight theme and keybinding set names.
Subclass ModuleName gets a name for File => Open Module.
Subclass HelpSource gets menu item and path for additions to Help menu.
�N)�
executable�platform)�Toplevel�	StringVar�
BooleanVar�W�E�S)�Frame�Button�Entry�Label�Checkbutton)�
filedialog)�FontcsleZdZdZdiddd�dd�Zddd	�Zd
d�Zdd
d�Zdd�Zddd�Z	ddd�Z
�fdd�Z�ZS)�QueryzoBase class for getting verified answer from a user.

    For this base class, accept any non-blank string.
    �F)�text0�
used_names�_htest�_utestc	CsX||_||_||_||_t�||�|��|�|�|�|�|�	�|j
�dd�}|dkr�y|j
�dd|jdd�WnYnX|�
d|j�|�
d	|j�|�d
|j�|�
d|j�|�
d|j�|��|��|�d
|��|��d|��d|��|�s$|��d|��dndf�|jddd�|�sT|��|��dS)a�Create modal popup, return when destroyed.

        Additional subclass init must be done before this unless
        _utest=True is passed to suppress wait_window().

        title - string, title of popup dialog
        message - string, informational message to display
        text0 - initial value for entry
        used_names - names already in use
        _htest - bool, change box location when running htest
        _utest - bool, leave window hidden and not modal
        �tk�windowingsystemZaquaz!::tk::unsupported::MacWindowStyleZstyleZ
moveableModalrz<Command-.>z<Key-Escape>ZWM_DELETE_WINDOWz<Key-Return>z
<KP_Enter>z+%d+%d��F)Zheight�widthN)�parent�messagerrr�__init__Zwithdraw�titleZ	transientZgrab_setrZcallZ_wZbind�cancelZprotocol�ok�create_widgetsZupdate_idletasksZgeometryZwinfo_rootxZwinfo_widthZwinfo_reqwidthZwinfo_rootyZwinfo_heightZwinfo_reqheightZ	resizableZ	deiconifyZwait_window)	�selfrrrrrrrr�r$�2/opt/alt/python37/lib64/python3.7/idlelib/query.pyr%sB


*zQuery.__init__�OKcCs6t|dd�|_}|jdddd�|jddd�t|dd	|jd
�}t||j�|_t	|d|jd�|_
|j
��td
d|j
d�|_t|dd|jd�|_|jddddtd�|j
jddddttddgd�|jjddddttd�|��t||d|jd�|_t|d|jd�|_|jjdddd�|jjdddd�dS)z�Create entry (rows, extras, buttons.

        Entry stuff on rows 0-2, spanning cols 0-2.
        Buttons on row 99, cols 1, 2.
        �
)ZpaddingrZnews)�column�row�sticky�)Zweight�w�left)�anchor�justify�text�)r�textvariableZ
TkCaptionFontT)�name�exists�root� �red)r0�
foreground�font��)r(r)�
columnspan�padxr*)r(r)r<r=r*�padyrZactive)r0�default�commandZCancel)r0r@�c)r(r)r=N)r
�frame�gridZgrid_columnconfigurer
rrrZentryvarr�entry�	focus_setrr�
error_font�entry_errorrr�create_extrarr!Z	button_okr Z
button_cancel)r#Zok_textrBZ
entrylabelr$r$r%r"[s0

zQuery.create_widgetscCsdS)Nr$)r#r$r$r%rH��zQuery.create_extraNcCsd||p|jd<dS)NzERROR: r0)rG)r#rZwidgetr$r$r%�	showerror�szQuery.showerrorcCs$|j����}|s |�d�dS|S)zReturn non-blank entry or None.zblank line.N)rD�get�striprJ)r#rDr$r$r%�entry_ok�s

zQuery.entry_okcCs8d|jd<|��}|dk	r*||_|��n
|j��dS)z�If entry is valid, bind it to 'result' and destroy tk widget.

        Otherwise leave dialog open for user to correct entry or cancel.
        rr0N)rGrM�result�destroyrDrE)r#�eventrDr$r$r%r!�s

zQuery.okcCsd|_|��dS)z0Set dialog result to None and destroy tk widget.N)rNrO)r#rPr$r$r%r �szQuery.cancelcs|��t���dS)N)Zgrab_release�superrO)r#)�	__class__r$r%rO�sz
Query.destroy)r&)N)N)N)
�__name__�
__module__�__qualname__�__doc__rr"rHrJrMr!r rO�
__classcell__r$r$)rRr%r s5
%


rcs0eZdZdZddd��fdd�
Zdd�Z�ZS)�SectionNamez*Get a name for a config file section name.F)rrcst�j||||||d�dS)N)rrr)rQr)r#rrrrrr)rRr$r%r�szSectionName.__init__cCsV|j����}|s |�d�dSt|�dkr:|�d�dS||jkrR|�d�dS|S)z2Return sensible ConfigParser section name or None.zno name specified.Nr1z"name is longer than 30 characters.zname is already in use.)rDrKrLrJ�lenr)r#r3r$r$r%rM�s



zSectionName.entry_ok)rSrTrUrVrrMrWr$r$)rRr%rX�srXcs0eZdZdZddd��fdd�
Zdd�Z�ZS)�
ModuleNamez-Get a module name for Open Module menu entry.F)rrcst�j||||||d�dS)N)rrr)rQr)r#rrrrrr)rRr$r%r�szModuleName.__init__c
Cs�|j����}|s |�d�dSytj�|�}Wn4ttfk
rd}z|�t	|��dSd}~XYnX|dkr||�d�dSt
|jtjj
�s�|�d�dSy|j�|�}Wn"tk
r�|jd|d�dSX|S)z0Return entered module name as file path or None.zno name specified.Nzmodule not foundznot a source-based modulez$loader does not support get_filename)r)rDrKrLrJ�	importlib�util�	find_spec�
ValueError�ImportError�str�
isinstance�loader�abc�SourceLoader�get_filename�AttributeError)r#r3�spec�msgZ	file_pathr$r$r%rM�s,


zModuleName.entry_ok)rSrTrUrVrrMrWr$r$)rRr%rZ�srZc@seZdZdZdd�ZdS)�Gotoz1Get a positive line number for editor Go To Line.cCsLyt|j���}Wntk
r0|�d�dSX|dkrH|�d�dS|S)Nznot a base 10 integer.rznot a positive integer.)�intrDrKr^rJ)r#�linenor$r$r%rM�s

z
Goto.entry_okN)rSrTrUrVrMr$r$r$r%ri�srics\eZdZdZddiddd��fdd�
Zdd�Zd	d
�Zdd�Zej	Z
d
d�Zdd�Z	�ZS)�
HelpSourcez,Get menu name and help source for Help menu.rF)�menuitem�filepathrrrc		s(||_d}t�j|||||||d�dS)z�Get menu entry and url/local file for Additional Help.

        User enters a name for the Help resource and a web url or file
        name. The user can browse for the file.
        zName for item on Help menu:)rrrrN)rnrQr)	r#rrrmrnrrrr)rRr$r%r�s
zHelpSource.__init__cCs�|j}t|dddd�}t||j�|_t||jdd�|_t|dd|jd	�}t|d
d|j	d�|_
|jd
ddddd
gtd�|jjd
dddtt
dd
gd�|jdddttd�|j
jd
dddtt
d�dS)zAdd path widjets to rows 10-12.r,r-z,Help File Path: Enter URL or browse for file)r.r/r0�()r2rZBrowse�)r0rr@r6r7)r0r8r9rr'r:r;)r(r)r<r=r>r*�r)r(r)r<r=r*r>)r(r)r=r*�)r(r)r<r=r*N)rBr
rrn�pathvarr�pathr�browse_filerF�
path_errorrCrrr	)r#rBZ	pathlabelZbrowser$r$r%rHs 
zHelpSource.create_extracCstj||d�j||d�S)N)r�	filetypes)Z
initialdirZinitialfile)rZOpenZshow)r#rwZinitdirZinitfiler$r$r%�askfilenameszHelpSource.askfilenamecCs�dddddg}|j��}|r.tj�|�\}}nHd}tdd�dkrntj�tj�t�d�}tj�	|�svt�
�}nt�
�}|�|||�}|r�|j�|�dS)	N)z
HTML Filesz*.htm *.html�TEXT)z	PDF Filesz*.pdfry)zWindows Help Filesz*.chm)z
Text Filesz*.txtry)z	All Files�*r:�winZDoc)
rsrK�osrt�splitr�join�dirnamer�isdir�getcwdrx�set)r#rwrt�dir�base�filer$r$r%rus"

zHelpSource.browse_filecCs||j����}|s$|�d|j�dS|�d�sx|dd�dkrJ|dd�}tj�|�sh|�d|j�dStdkrxd|}|S)	z(Simple validity check for menu file pathzno help file path specified.N)zwww.Zhttpr;zfile:zhelp file path does not exist.�darwinzfile://)	rtrKrLrJrv�
startswithr|r4r)r#rtr$r$r%�path_ok6s
zHelpSource.path_okcCs6d|jd<|��}|��}|dks*|dkr.dS||fS)z,Return apparently valid (name, path) or Nonerr0N)rv�item_okr�)r#r3rtr$r$r%rMGs
zHelpSource.entry_ok)
rSrTrUrVrrHrxrurXrMr�r�rWr$r$)rRr%rl�srlcsBeZdZdZgddd��fdd�
Zdd�Zdd	�Zd
d�Z�ZS)�	CustomRunz�Get settings for custom run of module.

    1. Command line arguments to extend sys.argv.
    2. Whether to restart Shell or not.
    F)�cli_argsrrcs d}t�j||||||d�dS)z�cli_args is a list of strings.

        The list is assigned to the default Entry StringVar.
        The strings are displayed joined by ' ' for display.
        z$Command Line Arguments for sys.argv:)rrrN)rQr)r#rrr�rrr)rRr$r%rVszCustomRun.__init__cCsj|j}t|dd�|_t||jdddd�}t|dd|jd�|_|jd	d
ddd
d�|jjd	ddddd�dS)zAdd run mode on rows 10-12.T)�valueFz
Restart shell)ZvariableZonvalueZoffvaluer0r6r7)r0r8r9rr'r:r;r,)r(r)r<r=r*rrZweN)rBr�
restartvarrr
rFZ
args_errorrC)r#rB�restartr$r$r%rHbs

zCustomRun.create_extrac
CsV|j����}ytj|dd�}Wn0tk
rP}z|�t|��dSd}~XYnX|S)z6Validity check and parsing for command line arguments.T)�posixN)rDrKrL�shlexr}r^rJr`)r#Z
cli_stringr��errr$r$r%�cli_args_okoszCustomRun.cli_args_okcCs&|��}|j��}|dkrdS||fS)z3Return apparently valid (cli_args, restart) or NoneN)r�r�rK)r#r�r�r$r$r%rMys
zCustomRun.entry_ok)	rSrTrUrVrrHr�rMrWr$r$)rRr%r�Ns

r��__main__)�mainzidlelib.idle_test.test_queryrF)�	verbosity�exit)�run)"rVr[r|r��sysrrZtkinterrrrrrr	Ztkinter.ttkr
rrr
rrZtkinter.fontrrrXrZrirlr�rSZunittestr�Zidlelib.idle_test.htestr�r$r$r$r%�<module>s( $\2


SILENT KILLER Tool