SILENT KILLERPanel

Current Path: > > opt > alt > python34 > lib64 > > python3.4 > idlelib >


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/python34/lib64//python3.4/idlelib/

NameTypeSizeLast ModifiedActions
Icons Directory - -
__pycache__ Directory - -
idle_test Directory - -
AutoComplete.py File 9202 bytes April 17 2024 17:09:57.
AutoCompleteWindow.py File 17739 bytes April 17 2024 17:09:57.
AutoExpand.py File 3395 bytes April 17 2024 17:09:57.
Bindings.py File 3046 bytes April 17 2024 17:09:57.
CREDITS.txt File 1865 bytes March 18 2019 16:51:26.
CallTipWindow.py File 6034 bytes April 17 2024 17:09:57.
CallTips.py File 5932 bytes April 17 2024 17:09:57.
ChangeLog File 56393 bytes March 18 2019 16:51:26.
ClassBrowser.py File 6999 bytes April 17 2024 17:09:58.
CodeContext.py File 8348 bytes April 17 2024 17:09:57.
ColorDelegator.py File 9695 bytes April 17 2024 17:09:57.
Debugger.py File 18759 bytes April 17 2024 17:09:57.
Delegator.py File 665 bytes April 17 2024 17:09:57.
EditorWindow.py File 66059 bytes April 17 2024 17:09:57.
FileList.py File 3813 bytes April 17 2024 17:09:57.
FormatParagraph.py File 7287 bytes April 17 2024 17:09:58.
GrepDialog.py File 5124 bytes April 17 2024 17:09:58.
HISTORY.txt File 10317 bytes March 18 2019 16:51:26.
HyperParser.py File 12877 bytes April 17 2024 17:09:57.
IOBinding.py File 19773 bytes April 17 2024 17:09:57.
IdleHistory.py File 4052 bytes April 17 2024 17:09:58.
MultiCall.py File 18571 bytes April 17 2024 17:09:57.
MultiStatusBar.py File 1348 bytes April 17 2024 17:09:57.
NEWS.txt File 39835 bytes March 18 2019 16:51:26.
ObjectBrowser.py File 3975 bytes April 17 2024 17:09:57.
OutputWindow.py File 4394 bytes April 17 2024 17:09:58.
ParenMatch.py File 6713 bytes April 17 2024 17:09:57.
PathBrowser.py File 3207 bytes April 17 2024 17:09:57.
Percolator.py File 3244 bytes April 17 2024 17:09:58.
PyParse.py File 20461 bytes April 17 2024 17:09:57.
PyShell.py File 58450 bytes April 17 2024 17:09:57.
README.txt File 7709 bytes March 18 2019 16:51:26.
RemoteDebugger.py File 12007 bytes April 17 2024 17:09:57.
RemoteObjectBrowser.py File 964 bytes April 17 2024 17:09:57.
ReplaceDialog.py File 6640 bytes April 17 2024 17:09:57.
RstripExtension.py File 1050 bytes April 17 2024 17:09:57.
ScriptBinding.py File 8061 bytes April 17 2024 17:09:57.
ScrolledList.py File 4375 bytes April 17 2024 17:09:57.
SearchDialog.py File 2630 bytes April 17 2024 17:09:57.
SearchDialogBase.py File 7009 bytes April 17 2024 17:09:57.
SearchEngine.py File 7485 bytes April 17 2024 17:09:58.
StackViewer.py File 4426 bytes April 17 2024 17:09:58.
TODO.txt File 8478 bytes March 18 2019 16:51:26.
ToolTip.py File 3173 bytes April 17 2024 17:09:58.
TreeWidget.py File 15024 bytes April 17 2024 17:09:57.
UndoDelegator.py File 10815 bytes April 17 2024 17:09:57.
WidgetRedirector.py File 6869 bytes April 17 2024 17:09:57.
WindowList.py File 2472 bytes April 17 2024 17:09:57.
ZoomHeight.py File 1300 bytes April 17 2024 17:09:58.
__init__.py File 288 bytes April 17 2024 17:09:57.
__main__.py File 159 bytes April 17 2024 17:09:57.
aboutDialog.py File 6688 bytes April 17 2024 17:09:57.
config-extensions.def File 2965 bytes March 18 2019 16:51:26.
config-highlight.def File 2515 bytes March 18 2019 16:51:26.
config-keys.def File 7777 bytes March 18 2019 16:51:26.
config-main.def File 2563 bytes March 18 2019 16:51:26.
configDialog.py File 64305 bytes April 17 2024 17:09:57.
configHandler.py File 32197 bytes April 17 2024 17:09:57.
configHelpSourceEdit.py File 6670 bytes April 17 2024 17:09:57.
configSectionNameDialog.py File 4007 bytes April 17 2024 17:09:57.
dynOptionMenuWidget.py File 1990 bytes April 17 2024 17:09:57.
extend.txt File 3642 bytes March 18 2019 16:51:26.
help.html File 41126 bytes March 18 2019 16:51:26.
help.py File 9701 bytes April 17 2024 17:09:57.
help.txt File 17900 bytes March 18 2019 16:51:26.
idle.py File 400 bytes April 17 2024 17:09:57.
idle.pyw File 570 bytes March 18 2019 16:51:26.
idlever.py File 415 bytes April 17 2024 17:09:57.
keybindingDialog.py File 12416 bytes April 17 2024 17:09:57.
macosxSupport.py File 8684 bytes April 17 2024 17:09:57.
rpc.py File 20782 bytes April 17 2024 17:09:57.
run.py File 13673 bytes April 17 2024 17:09:57.
tabbedpages.py File 18418 bytes April 17 2024 17:09:57.
textView.py File 3225 bytes April 17 2024 17:09:57.

Reading File: //opt/alt/python34/lib64//python3.4/idlelib//ScrolledList.py

from tkinter import *
from idlelib import macosxSupport

class ScrolledList:

    default = "(None)"

    def __init__(self, master, **options):
        # Create top frame, with scrollbar and listbox
        self.master = master
        self.frame = frame = Frame(master)
        self.frame.pack(fill="both", expand=1)
        self.vbar = vbar = Scrollbar(frame, name="vbar")
        self.vbar.pack(side="right", fill="y")
        self.listbox = listbox = Listbox(frame, exportselection=0,
            background="white")
        if options:
            listbox.configure(options)
        listbox.pack(expand=1, fill="both")
        # Tie listbox and scrollbar together
        vbar["command"] = listbox.yview
        listbox["yscrollcommand"] = vbar.set
        # Bind events to the list box
        listbox.bind("<ButtonRelease-1>", self.click_event)
        listbox.bind("<Double-ButtonRelease-1>", self.double_click_event)
        if macosxSupport.isAquaTk():
            listbox.bind("<ButtonPress-2>", self.popup_event)
            listbox.bind("<Control-Button-1>", self.popup_event)
        else:
            listbox.bind("<ButtonPress-3>", self.popup_event)
        listbox.bind("<Key-Up>", self.up_event)
        listbox.bind("<Key-Down>", self.down_event)
        # Mark as empty
        self.clear()

    def close(self):
        self.frame.destroy()

    def clear(self):
        self.listbox.delete(0, "end")
        self.empty = 1
        self.listbox.insert("end", self.default)

    def append(self, item):
        if self.empty:
            self.listbox.delete(0, "end")
            self.empty = 0
        self.listbox.insert("end", str(item))

    def get(self, index):
        return self.listbox.get(index)

    def click_event(self, event):
        self.listbox.activate("@%d,%d" % (event.x, event.y))
        index = self.listbox.index("active")
        self.select(index)
        self.on_select(index)
        return "break"

    def double_click_event(self, event):
        index = self.listbox.index("active")
        self.select(index)
        self.on_double(index)
        return "break"

    menu = None

    def popup_event(self, event):
        if not self.menu:
            self.make_menu()
        menu = self.menu
        self.listbox.activate("@%d,%d" % (event.x, event.y))
        index = self.listbox.index("active")
        self.select(index)
        menu.tk_popup(event.x_root, event.y_root)

    def make_menu(self):
        menu = Menu(self.listbox, tearoff=0)
        self.menu = menu
        self.fill_menu()

    def up_event(self, event):
        index = self.listbox.index("active")
        if self.listbox.selection_includes(index):
            index = index - 1
        else:
            index = self.listbox.size() - 1
        if index < 0:
            self.listbox.bell()
        else:
            self.select(index)
            self.on_select(index)
        return "break"

    def down_event(self, event):
        index = self.listbox.index("active")
        if self.listbox.selection_includes(index):
            index = index + 1
        else:
            index = 0
        if index >= self.listbox.size():
            self.listbox.bell()
        else:
            self.select(index)
            self.on_select(index)
        return "break"

    def select(self, index):
        self.listbox.focus_set()
        self.listbox.activate(index)
        self.listbox.selection_clear(0, "end")
        self.listbox.selection_set(index)
        self.listbox.see(index)

    # Methods to override for specific actions

    def fill_menu(self):
        pass

    def on_select(self, index):
        pass

    def on_double(self, index):
        pass


def _scrolled_list(parent):
    root = Tk()
    root.title("Test ScrolledList")
    width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
    root.geometry("+%d+%d"%(x, y + 150))
    class MyScrolledList(ScrolledList):
        def fill_menu(self): self.menu.add_command(label="right click")
        def on_select(self, index): print("select", self.get(index))
        def on_double(self, index): print("double", self.get(index))

    scrolled_list = MyScrolledList(root)
    for i in range(30):
        scrolled_list.append("Item %02d" % i)

    root.mainloop()

if __name__ == '__main__':
    from idlelib.idle_test.htest import run
    run(_scrolled_list)

SILENT KILLER Tool