SILENT KILLERPanel

Current Path: > > opt > alt > python27 > lib64 > python2.7 > xml > > > dom


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/xml///dom

NameTypeSizeLast ModifiedActions
NodeFilter.py File 937 bytes January 08 2025 10:43:39.
NodeFilter.pyc File 1165 bytes January 08 2025 10:43:39.
NodeFilter.pyo File 1165 bytes January 08 2025 10:43:39.
__init__.py File 3998 bytes January 08 2025 10:43:39.
__init__.pyc File 6765 bytes January 08 2025 10:43:39.
__init__.pyo File 6765 bytes January 08 2025 10:43:39.
domreg.py File 3527 bytes January 08 2025 10:43:39.
domreg.pyc File 3449 bytes January 08 2025 10:43:39.
domreg.pyo File 3449 bytes January 08 2025 10:43:39.
expatbuilder.py File 36383 bytes January 08 2025 10:43:39.
expatbuilder.pyc File 34153 bytes January 08 2025 10:43:39.
expatbuilder.pyo File 33510 bytes January 08 2025 10:43:39.
minicompat.py File 3357 bytes January 08 2025 10:43:39.
minicompat.pyc File 3612 bytes January 08 2025 10:43:39.
minicompat.pyo File 3500 bytes January 08 2025 10:43:39.
minidom.py File 66275 bytes January 08 2025 10:43:39.
minidom.pyc File 68569 bytes January 08 2025 10:43:39.
minidom.pyo File 68437 bytes January 08 2025 10:43:39.
pulldom.py File 11974 bytes January 08 2025 10:43:39.
pulldom.pyc File 13624 bytes January 08 2025 10:43:39.
pulldom.pyo File 13624 bytes January 08 2025 10:43:39.
xmlbuilder.py File 12337 bytes January 08 2025 10:43:39.
xmlbuilder.pyc File 16055 bytes January 08 2025 10:43:39.
xmlbuilder.pyo File 16011 bytes January 08 2025 10:43:39.

Reading File: //opt/alt/python27/lib64/python2.7/xml///dom/minicompat.py

"""Python version compatibility support for minidom."""

# This module should only be imported using "import *".
#
# The following names are defined:
#
#   NodeList      -- lightest possible NodeList implementation
#
#   EmptyNodeList -- lightest possible NodeList that is guaranteed to
#                    remain empty (immutable)
#
#   StringTypes   -- tuple of defined string types
#
#   defproperty   -- function used in conjunction with GetattrMagic;
#                    using these together is needed to make them work
#                    as efficiently as possible in both Python 2.2+
#                    and older versions.  For example:
#
#                        class MyClass(GetattrMagic):
#                            def _get_myattr(self):
#                                return something
#
#                        defproperty(MyClass, "myattr",
#                                    "return some value")
#
#                    For Python 2.2 and newer, this will construct a
#                    property object on the class, which avoids
#                    needing to override __getattr__().  It will only
#                    work for read-only attributes.
#
#                    For older versions of Python, inheriting from
#                    GetattrMagic will use the traditional
#                    __getattr__() hackery to achieve the same effect,
#                    but less efficiently.
#
#                    defproperty() should be used for each version of
#                    the relevant _get_<property>() function.

__all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"]

import xml.dom

try:
    unicode
except NameError:
    StringTypes = type(''),
else:
    StringTypes = type(''), type(unicode(''))


class NodeList(list):
    __slots__ = ()

    def item(self, index):
        if 0 <= index < len(self):
            return self[index]

    def _get_length(self):
        return len(self)

    def _set_length(self, value):
        raise xml.dom.NoModificationAllowedErr(
            "attempt to modify read-only attribute 'length'")

    length = property(_get_length, _set_length,
                      doc="The number of nodes in the NodeList.")

    # For backward compatibility
    def __setstate__(self, state):
        if state is None:
            state = []
        self[:] = state


class EmptyNodeList(tuple):
    __slots__ = ()

    def __add__(self, other):
        NL = NodeList()
        NL.extend(other)
        return NL

    def __radd__(self, other):
        NL = NodeList()
        NL.extend(other)
        return NL

    def item(self, index):
        return None

    def _get_length(self):
        return 0

    def _set_length(self, value):
        raise xml.dom.NoModificationAllowedErr(
            "attempt to modify read-only attribute 'length'")

    length = property(_get_length, _set_length,
                      doc="The number of nodes in the NodeList.")


def defproperty(klass, name, doc):
    get = getattr(klass, ("_get_" + name)).im_func
    def set(self, value, name=name):
        raise xml.dom.NoModificationAllowedErr(
            "attempt to modify read-only attribute " + repr(name))
    assert not hasattr(klass, "_set_" + name), \
           "expected not to find _set_" + name
    prop = property(get, set, doc=doc)
    setattr(klass, name, prop)

SILENT KILLER Tool