$85 GRAYBYTE WORDPRESS FILE MANAGER $98

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 88.222.243.98 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/guppy/etc/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/guppy/etc//etc.py
from io import StringIO


def reptable(tb):
    if not tb:
        return 0, []
    maxlens = [0]*len(tb[0])
    for r in tb:
        if r == '-':
            continue
        for i, e in enumerate(r):
            maxlens[i] = max(maxlens[i], len(str(e))+1)

    sumlens = len(maxlens)
    for s in maxlens:
        sumlens += s

    out = []
    for r in tb:
        if r == '-':
            out.append('-'*min(sumlens, 75))
        else:
            so = ''
            for i, e in enumerate(r):
                s = str(e)
                if s.startswith('!>'):
                    s = s[2:]
                    fillright = 1
                elif s.isdigit():
                    fillright = 1
                else:
                    fillright = 0
                ml = maxlens[i]-1
                fill = ' '*(ml - len(s))
                if fillright:
                    s = fill + s
                else:
                    s = s + fill
                so += s + ' '
            out.append(so)
    return maxlens, out


def ptable(tb, f=None):
    if f is None:
        import sys
        f = sys.stdout
    _, lines = reptable(tb)
    for line in lines:
        line = line.rstrip()
        print(line, file=f)


def strtable(tb):
    f = StringIO()
    ptable(tb, f)
    return f.getvalue()


def str2int(s, msg='Hexadecimal literal in the form [-]0x... expected'):
    # xxx clumsy -- there should be a builtin function for this !
    if s.startswith('-'):
        sign = -1
        s = s[1:]
    else:
        sign = 1
    if not s.startswith('0x'):
        raise ValueError(msg)
    s = s[2:]
    if s.endswith('l') or s.endswith('L'):
        s = s[:-1]
    return int(s, 16) * sign

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.26 PM
root / 996
0755
__pycache__
--
25 Jan 2024 4.26 PM
root / 996
0755
Cat.py
3.992 KB
21 Nov 2019 9.31 PM
root / 996
0644
Code.py
1.031 KB
21 Nov 2019 9.31 PM
root / 996
0644
Descriptor.py
0.782 KB
21 Nov 2019 9.31 PM
root / 996
0644
FSA.py
7.203 KB
21 Nov 2019 9.31 PM
root / 996
0644
Glue.py
13.338 KB
21 Nov 2019 9.31 PM
root / 996
0644
Help.py
6.712 KB
21 Nov 2019 9.31 PM
root / 996
0644
IterPermute.py
2.22 KB
21 Nov 2019 9.31 PM
root / 996
0644
KanExtension.py
20.708 KB
21 Nov 2019 9.31 PM
root / 996
0644
KnuthBendix.py
8.812 KB
21 Nov 2019 9.31 PM
root / 996
0644
RE.py
23.588 KB
21 Nov 2019 9.31 PM
root / 996
0644
RE_Rect.py
10.386 KB
21 Nov 2019 9.31 PM
root / 996
0644
__init__.py
0.085 KB
21 Nov 2019 9.31 PM
root / 996
0644
cmd.py
14.717 KB
21 Nov 2019 9.31 PM
root / 996
0644
etc.py
1.657 KB
21 Nov 2019 9.31 PM
root / 996
0644
textView.py
3.072 KB
21 Nov 2019 9.31 PM
root / 996
0644
tkcursors.py
2.126 KB
21 Nov 2019 9.31 PM
root / 996
0644
xterm.py
2.31 KB
21 Nov 2019 9.31 PM
root / 996
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF