AnonSec Shell
Server IP : 92.204.138.22  /  Your IP : 18.221.4.52
Web Server : Apache
System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
User : internationaljou ( 1019)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/usr/lib64/python2.7/Demo/tkinter/guido/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/usr/lib64/python2.7/Demo/tkinter/guido/listtree.py
# List a remote app's widget tree (names and classes only)

import sys
import string

from Tkinter import *

def listtree(master, app):
    list = Listbox(master, name='list')
    list.pack(expand=1, fill=BOTH)
    listnodes(list, app, '.', 0)
    return list

def listnodes(list, app, widget, level):
    klass = list.send(app, 'winfo', 'class', widget)
##      i = string.rindex(widget, '.')
##      list.insert(END, '%s%s (%s)' % ((level-1)*'.   ', widget[i:], klass))
    list.insert(END, '%s (%s)' % (widget, klass))
    children = list.tk.splitlist(
            list.send(app, 'winfo', 'children', widget))
    for c in children:
        listnodes(list, app, c, level+1)

def main():
    if not sys.argv[1:]:
        sys.stderr.write('Usage: listtree appname\n')
        sys.exit(2)
    app = sys.argv[1]
    tk = Tk()
    tk.minsize(1, 1)
    f = Frame(tk, name='f')
    f.pack(expand=1, fill=BOTH)
    list = listtree(f, app)
    tk.mainloop()

if __name__ == '__main__':
    main()

Anon7 - 2022
AnonSec Team