GRAYBYTE WORDPRESS FILE MANAGER2891

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib64/python2.7/compiler/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib64/python2.7/compiler//future.py
"""Parser for future statements

"""

from compiler import ast, walk

def is_future(stmt):
    """Return true if statement is a well-formed future statement"""
    if not isinstance(stmt, ast.From):
        return 0
    if stmt.modname == "__future__":
        return 1
    else:
        return 0

class FutureParser:

    features = ("nested_scopes", "generators", "division",
                "absolute_import", "with_statement", "print_function",
                "unicode_literals")

    def __init__(self):
        self.found = {} # set

    def visitModule(self, node):
        stmt = node.node
        for s in stmt.nodes:
            if not self.check_stmt(s):
                break

    def check_stmt(self, stmt):
        if is_future(stmt):
            for name, asname in stmt.names:
                if name in self.features:
                    self.found[name] = 1
                else:
                    raise SyntaxError, \
                          "future feature %s is not defined" % name
            stmt.valid_future = 1
            return 1
        return 0

    def get_features(self):
        """Return list of features enabled by future statements"""
        return self.found.keys()

class BadFutureParser:
    """Check for invalid future statements"""

    def visitFrom(self, node):
        if hasattr(node, 'valid_future'):
            return
        if node.modname != "__future__":
            return
        raise SyntaxError, "invalid future statement " + repr(node)

def find_futures(node):
    p1 = FutureParser()
    p2 = BadFutureParser()
    walk(node, p1)
    walk(node, p2)
    return p1.get_features()

if __name__ == "__main__":
    import sys
    from compiler import parseFile, walk

    for file in sys.argv[1:]:
        print file
        tree = parseFile(file)
        v = FutureParser()
        walk(tree, v)
        print v.found
        print

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 08:34:30
root / root
0755
__init__.py
0.999 KB
April 10 2024 04:58:35
root / root
0644
__init__.pyc
1.267 KB
April 10 2024 04:58:46
root / root
0644
__init__.pyo
1.267 KB
April 10 2024 04:58:46
root / root
0644
ast.py
36.629 KB
April 10 2024 04:58:35
root / root
0644
ast.pyc
70.435 KB
April 10 2024 04:58:46
root / root
0644
ast.pyo
70.435 KB
April 10 2024 04:58:46
root / root
0644
consts.py
0.457 KB
April 10 2024 04:58:35
root / root
0644
consts.pyc
0.72 KB
April 10 2024 04:58:46
root / root
0644
consts.pyo
0.72 KB
April 10 2024 04:58:46
root / root
0644
future.py
1.849 KB
April 10 2024 04:58:35
root / root
0644
future.pyc
2.887 KB
April 10 2024 04:58:46
root / root
0644
future.pyo
2.887 KB
April 10 2024 04:58:46
root / root
0644
misc.py
1.752 KB
April 10 2024 04:58:35
root / root
0644
misc.pyc
3.646 KB
April 10 2024 04:58:46
root / root
0644
misc.pyo
3.646 KB
April 10 2024 04:58:46
root / root
0644
pyassem.py
23.699 KB
April 10 2024 04:58:35
root / root
0644
pyassem.pyc
25.343 KB
April 10 2024 04:58:46
root / root
0644
pyassem.pyo
24.782 KB
April 10 2024 04:58:43
root / root
0644
pycodegen.py
46.688 KB
April 10 2024 04:58:35
root / root
0644
pycodegen.pyc
55.19 KB
April 10 2024 04:58:46
root / root
0644
pycodegen.pyo
54.757 KB
April 10 2024 04:58:43
root / root
0644
symbols.py
14.149 KB
April 10 2024 04:58:35
root / root
0644
symbols.pyc
17.263 KB
April 10 2024 04:58:46
root / root
0644
symbols.pyo
17.229 KB
April 10 2024 04:58:43
root / root
0644
syntax.py
1.41 KB
April 10 2024 04:58:35
root / root
0644
syntax.pyc
1.838 KB
April 10 2024 04:58:46
root / root
0644
syntax.pyo
1.838 KB
April 10 2024 04:58:46
root / root
0644
transformer.py
51.871 KB
April 10 2024 04:58:35
root / root
0644
transformer.pyc
46.528 KB
April 10 2024 04:58:46
root / root
0644
transformer.pyo
44.756 KB
April 10 2024 04:58:43
root / root
0644
visitor.py
3.805 KB
April 10 2024 04:58:35
root / root
0644
visitor.pyc
4.089 KB
April 10 2024 04:58:46
root / root
0644
visitor.pyo
4.089 KB
April 10 2024 04:58:46
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF