SILENT KILLERPanel

Current Path: > > opt > alt > python27 > lib64 > python2.7 > compiler


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/python27/lib64/python2.7/compiler

NameTypeSizeLast ModifiedActions
__init__.py File 1023 bytes January 08 2025 10:43:00.
__init__.pyc File 1310 bytes January 08 2025 10:43:01.
__init__.pyo File 1310 bytes January 08 2025 10:43:01.
ast.py File 37508 bytes January 08 2025 10:43:01.
ast.pyc File 77182 bytes January 08 2025 10:43:00.
ast.pyo File 77182 bytes January 08 2025 10:43:00.
consts.py File 468 bytes January 08 2025 10:43:00.
consts.pyc File 750 bytes January 08 2025 10:43:00.
consts.pyo File 750 bytes January 08 2025 10:43:00.
future.py File 1893 bytes January 08 2025 10:43:01.
future.pyc File 3086 bytes January 08 2025 10:43:00.
future.pyo File 3086 bytes January 08 2025 10:43:00.
misc.py File 1794 bytes January 08 2025 10:43:01.
misc.pyc File 3980 bytes January 08 2025 10:43:01.
misc.pyo File 3980 bytes January 08 2025 10:43:01.
pyassem.py File 24268 bytes January 08 2025 10:43:00.
pyassem.pyc File 26991 bytes January 08 2025 10:43:01.
pyassem.pyo File 26417 bytes January 08 2025 10:43:01.
pycodegen.py File 47809 bytes January 08 2025 10:43:01.
pycodegen.pyc File 58764 bytes January 08 2025 10:43:01.
pycodegen.pyo File 58320 bytes January 08 2025 10:43:00.
symbols.py File 14489 bytes January 08 2025 10:43:01.
symbols.pyc File 18405 bytes January 08 2025 10:43:00.
symbols.pyo File 18371 bytes January 08 2025 10:43:01.
syntax.py File 1444 bytes January 08 2025 10:43:00.
syntax.pyc File 1960 bytes January 08 2025 10:43:01.
syntax.pyo File 1960 bytes January 08 2025 10:43:01.
transformer.py File 53116 bytes January 08 2025 10:43:01.
transformer.pyc File 49270 bytes January 08 2025 10:43:01.
transformer.pyo File 47455 bytes January 08 2025 10:43:01.
visitor.py File 3896 bytes January 08 2025 10:43:01.
visitor.pyc File 4317 bytes January 08 2025 10:43:01.
visitor.pyo File 4317 bytes January 08 2025 10:43:01.

Reading File: //opt/alt/python27/lib64/python2.7/compiler/syntax.py

"""Check for errs in the AST.

The Python parser does not catch all syntax errors.  Others, like
assignments with invalid targets, are caught in the code generation
phase.

The compiler package catches some errors in the transformer module.
But it seems clearer to write checkers that use the AST to detect
errors.
"""

from compiler import ast, walk

def check(tree, multi=None):
    v = SyntaxErrorChecker(multi)
    walk(tree, v)
    return v.errors

class SyntaxErrorChecker:
    """A visitor to find syntax errors in the AST."""

    def __init__(self, multi=None):
        """Create new visitor object.

        If optional argument multi is not None, then print messages
        for each error rather than raising a SyntaxError for the
        first.
        """
        self.multi = multi
        self.errors = 0

    def error(self, node, msg):
        self.errors = self.errors + 1
        if self.multi is not None:
            print "%s:%s: %s" % (node.filename, node.lineno, msg)
        else:
            raise SyntaxError, "%s (%s:%s)" % (msg, node.filename, node.lineno)

    def visitAssign(self, node):
        # the transformer module handles many of these
        pass
##        for target in node.nodes:
##            if isinstance(target, ast.AssList):
##                if target.lineno is None:
##                    target.lineno = node.lineno
##                self.error(target, "can't assign to list comprehension")

SILENT KILLER Tool