Revonzy Mini Shell

Şuanki Dizin: /lib64/python2.7/site-packages/Cheetah/
Dosya Yükle :
Şuanki Dosya : //lib64/python2.7/site-packages/Cheetah/Servlet.py

#!/usr/bin/env python
'''
Provides an abstract Servlet baseclass for Cheetah's Template class
'''

import sys
import os.path

class Servlet(object):
    """
        This class is an abstract baseclass for Cheetah.Template.Template.
    """

    transaction = None
    application = None
    request = None
    session = None

    def respond(self, trans=None):
        raise NotImplementedError("""\
couldn't find the template's main method.  If you are using #extends
without #implements, try adding '#implements respond' to your template
definition.""")

    def sleep(self, transaction):
        super(Servlet, self).sleep(transaction)
        self.session = None
        self.request  = None
        self._request  = None
        self.response = None
        self.transaction = None

    def shutdown(self):
        pass

    def serverSidePath(self, path=None,
                       normpath=os.path.normpath,
                       abspath=os.path.abspath
                       ):

        if path:
            return normpath(abspath(path.replace("\\", '/')))
        elif hasattr(self, '_filePath') and self._filePath:
            return normpath(abspath(self._filePath))
        else:
            return None

# vim: shiftwidth=4 tabstop=4 expandtab

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux vps.suncrosonline.com 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64
Apache
162.241.69.42