__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import re
import urwid

from subiquitycore.ui.stretchy import StretchyOverlay


def find_with_pred(w, pred, return_path=False):
    def _walk(w, path):
        if not isinstance(w, urwid.Widget):
            raise RuntimeError(
                "_walk walked to non-widget %r via %r" % (w, path))
        if pred(w):
            return w, path
        if hasattr(w, '_wrapped_widget'):
            return _walk(w._wrapped_widget, (w,) + path)
        if hasattr(w, 'original_widget'):
            return _walk(w.original_widget, (w,) + path)
        if isinstance(w, urwid.ListBox):
            for w in w.body:
                r, p = _walk(w, (w,) + path)
                if r:
                    return r, p
        elif isinstance(w, urwid.Frame):
            for w, _ in w.contents.values():
                r, p = _walk(w, (w,) + path)
                if r:
                    return r, p
        elif hasattr(w, 'contents'):
            contents = w.contents
            for w, _ in contents:
                r, p = _walk(w, (w,) + path)
                if r:
                    return r, p
        elif isinstance(w, StretchyOverlay):
            r, p = _walk(w.top_w, (w,) + path)
            if r:
                return r, p
        return None, None
    r, p = _walk(w, ())
    if return_path:
        return r, p
    else:
        return r


def find_button_matching(w, pat, return_path=False):
    def pred(w):
        return isinstance(w, urwid.Button) and re.match(pat, w.label)
    return find_with_pred(w, pred, return_path)


def click(but):
    but._emit('click')


def keypress(w, key, size=(30, 1)):
    w.keypress(size, key)


def get_focus_path(w):
    path = []
    while True:
        path.append(w)
        if isinstance(w, urwid.ListBox) and (w.set_focus_pending ==
                                             "first selectable"):
            for w2 in w.body:
                if w2.selectable():
                    w = w2
                    break
            else:
                break
        if w.focus is not None:
            w = w.focus
        elif hasattr(w, '_wrapped_widget'):
            w = w._wrapped_widget
        elif hasattr(w, 'original_widget'):
            w = w.original_widget
        else:
            break
    return path


def enter_data(form, data):
    for k, v in data.items():
        bf = getattr(form, k)
        assert bf.enabled, "%s is not enabled" % (k,)
        bf.value = v

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
view_helpers.py File 2.39 KB 0644
Filemanager