1
  5   ˆl–Ãa¾”Ò~êqA3p¸”Å£�þB gr3â”óÂƒh¹ÁÀ¿      1
  5   ˆl–ß=¿Jõ4Ÿº‚ œP.\· %1hß�þB g Ùl.F@´çÃƒh¹ÂÁÀ      Node 0 MemTotal:       16375504 kB
Node 0 MemFree:          248016 kB
Node 0 MemUsed:        16127488 kB
Node 0 SwapCached:        32452 kB
Node 0 Active:          2860096 kB
Node 0 Inactive:       12267488 kB
Node 0 Active(anon):     829964 kB
Node 0 Inactive(anon): 10533164 kB
Node 0 Active(file):    2030132 kB
Node 0 Inactive(file):  1734324 kB
Node 0 Unevictable:       20336 kB
Node 0 Mlocked:           20336 kB
Node 0 Dirty:              2048 kB
Node 0 Writeback:             0 kB
Node 0 FilePages:       4129680 kB
Node 0 Mapped:           724112 kB
Node 0 AnonPages:      10986424 kB
Node 0 Shmem:            331144 kB
Node 0 KernelStack:       24928 kB
Node 0 PageTables:        73820 kB
Node 0 SecPageTables:         0 kB
Node 0 NFS_Unstable:          0 kB
Node 0 Bounce:                0 kB
Node 0 WritebackTmp:          0 kB
Node 0 KReclaimable:     448804 kB
Node 0 Slab:             600628 kB
Node 0 SReclaimable:     448804 kB
Node 0 SUnreclaim:       151824 kB
Node 0 AnonHugePages:   4491264 kB
Node 0 ShmemHugePages:        0 kB
Node 0 ShmemPmdMapped:        0 kB
Node 0 FileHugePages:        0 kB
Node 0 FilePmdMapped:        0 kB
Node 0 HugePages_Total:     0
Node 0 HugePages_Free:      0
Node 0 HugePages_Surp:      0
  6   ˆl–Ãa¾”Ò~êqA3pÜiµ1hß�þB gr4ôl’QËüÿÄƒh¹ÃÂÁ      0
  5   	ˆl–Ãa¾”Ò~êqA3p ¸ÛêbÑ¿�þB gr2èäagùÅƒh¹ÄÃÂ      	0000008c
  5   ˆl–Ãa¾”Ò~êqA3pÜjbÑ¿�þB gr6ÐÆ'YgùÆƒh¹ÅÄÃ      1
  7   ˆl–Ãa¾”Ò~êqA3p.\m¥1hß‘äÇò 8à#‘Ð1ºó_ÏÇƒh¹ÆÅÄ      128
  Z   ˆl–Ðz¾”Šj"Tâ‚À½q¶”Å£�þZrWVq²‘¸Ý�Jð?ŸÈ„ÁqßÇ_ŠI|¥�+Wé3ž¯a–Ãa¾”Ò~êqA3p.\mµ1hßÇ ?÷     """CherryPy tools. A "tool" is any helper, adapted to CP.

Tools are usually designed to be used in a variety of ways (although
some may only offer one if they choose):

    Library calls
        All tools are callables that can be used wherever needed.
        The arguments are straightforward and should be detailed within the
        docstring.

    Function decorators
        All tools, when called, may be used as decorators which configure
        individual CherryPy page handlers (methods on the CherryPy tree).
        That is, "@tools.anytool()" should "turn on" the tool via the
        decorated function's _cp_config attribute.

    CherryPy config
        If a tool exposes a "_setup" callable, it will be called
        once per Request (if the feature is "turned on" via config).

Tools may be implemented as any object with a namespace. The builtins
are generally either modules or instances of the tools.Tool class.
"""

import cherrypy
from cherrypy._helper import expose

from cherrypy.lib import cptools, encoding, static, jsontools
from cherrypy.lib import sessions as _sessions, xmlrpcutil as _xmlrpc
from cherrypy.lib import caching as _caching
from cherrypy.lib import auth_basic, auth_digest


def _getargs(func):
    """Return the names of all static arguments to the given function."""
    # Use this instead of importing inspect for less mem overhead.
    import types
    if isinstance(func, types.MethodType):
        func = func.__func__
    co = func.__code__
    return co.co_varnames[:co.co_argcount]


_attr_error = (
    'CherryPy Tools cannot be turned on directly. Instead, turn them '
    'on via config, or use them as decorators on your page handlers.'
)


class Tool(object):
    """A registered function for use with CherryPy request-processing hooks.

    help(tool.callable) should give you more information about this
    Tool.
    """

    namespace = 'tools'

    def __init__(self, point, callable, name=None, priority=50):
        self._point = point
        self.callable = callable
        self._name = name
        self._priority = priority
        self.__doc__ = self.callable.__doc__
        self._setargs()

    @property
    def on(self):
        raise AttributeError(_attr_error)

    @on.setter
    def on(self, value):
        raise