GRAYBYTE WORDPRESS FILE MANAGER6196

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 : /lib64/python2.7/xml/dom/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /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)

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 08:34:30
root / root
0755
NodeFilter.py
0.915 KB
April 10 2024 04:58:35
root / root
0644
NodeFilter.pyc
1.1 KB
April 10 2024 04:58:46
root / root
0644
NodeFilter.pyo
1.1 KB
April 10 2024 04:58:46
root / root
0644
__init__.py
3.904 KB
April 10 2024 04:58:35
root / root
0644
__init__.pyc
6.327 KB
April 10 2024 04:58:46
root / root
0644
__init__.pyo
6.327 KB
April 10 2024 04:58:46
root / root
0644
domreg.py
3.444 KB
April 10 2024 04:58:35
root / root
0644
domreg.pyc
3.305 KB
April 10 2024 04:58:46
root / root
0644
domreg.pyo
3.305 KB
April 10 2024 04:58:46
root / root
0644
expatbuilder.py
35.53 KB
April 10 2024 04:58:35
root / root
0644
expatbuilder.pyc
32.223 KB
April 10 2024 04:58:46
root / root
0644
expatbuilder.pyo
31.607 KB
April 10 2024 04:58:44
root / root
0644
minicompat.py
3.278 KB
April 10 2024 04:58:35
root / root
0644
minicompat.pyc
3.35 KB
April 10 2024 04:58:46
root / root
0644
minicompat.pyo
3.24 KB
April 10 2024 04:58:44
root / root
0644
minidom.py
64.722 KB
April 10 2024 04:58:35
root / root
0644
minidom.pyc
64.067 KB
April 10 2024 04:58:46
root / root
0644
minidom.pyo
63.938 KB
April 10 2024 04:58:44
root / root
0644
pulldom.py
11.693 KB
April 10 2024 04:58:35
root / root
0644
pulldom.pyc
12.771 KB
April 10 2024 04:58:46
root / root
0644
pulldom.pyo
12.771 KB
April 10 2024 04:58:46
root / root
0644
xmlbuilder.py
12.048 KB
April 10 2024 04:58:35
root / root
0644
xmlbuilder.pyc
14.98 KB
April 10 2024 04:58:46
root / root
0644
xmlbuilder.pyo
14.938 KB
April 10 2024 04:58:44
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF