当前位置: 首页>>代码示例>>Python>>正文


Python HTTPRequest.__init__方法代码示例

本文整理汇总了Python中ZPublisher.HTTPRequest.HTTPRequest.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HTTPRequest.__init__方法的具体用法?Python HTTPRequest.__init__怎么用?Python HTTPRequest.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZPublisher.HTTPRequest.HTTPRequest的用法示例。


在下文中一共展示了HTTPRequest.__init__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from ZPublisher.HTTPRequest import HTTPRequest [as 别名]
# 或者: from ZPublisher.HTTPRequest.HTTPRequest import __init__ [as 别名]
    def __init__(self, path, command, channel, response, stdin=None,
                 environ=None, globbing=None, recursive=0, size=None):

        # we need to store the globbing information to pass it
        # to the ZPublisher and the manage_FTPlist function
        # (ajung)
        self.globbing = globbing
        self.recursive = recursive

        if stdin is None:
            size = 0
            stdin = StringIO()

        if environ is None:
            environ = self._get_env(path, command, channel, stdin, size)

        self._orig_env = environ
        HTTPRequest.__init__(self, stdin, environ, response, clean=1)

        # support for cookies and cookie authentication
        self.cookies = channel.cookies
        if '__ac' not in self.cookies and channel.userid != 'anonymous':
            self.other['__ac_name'] = channel.userid
            self.other['__ac_password'] = channel.password
        for k, v in self.cookies.items():
            if k not in self.other:
                self.other[k] = v
开发者ID:zopefoundation,项目名称:ZServer,代码行数:29,代码来源:FTPRequest.py

示例2: __init__

# 需要导入模块: from ZPublisher.HTTPRequest import HTTPRequest [as 别名]
# 或者: from ZPublisher.HTTPRequest.HTTPRequest import __init__ [as 别名]
 def __init__(self,language=None):
     resp = HTTPResponse(stdout=sys.stdout)
     environ={}
     environ['SERVER_NAME']='foo'
     environ['SERVER_PORT']='80'
     environ['REQUEST_METHOD'] = 'GET'
     environ['SCRIPT_NAME']='/foo/test'
     environ['SESSION']=None
     self.SESSION={}
     HTTPRequest.__init__(self,None,environ,resp)
     if language: self.setLanguage(language)
开发者ID:eaudeweb,项目名称:EionetProducts,代码行数:13,代码来源:testsupport.py

示例3: __init__

# 需要导入模块: from ZPublisher.HTTPRequest import HTTPRequest [as 别名]
# 或者: from ZPublisher.HTTPRequest.HTTPRequest import __init__ [as 别名]
    def __init__(self, response, interval):
        stdin=StringIO()
        environ=self._get_env(stdin)
        HTTPRequest.__init__(self, stdin, environ, response, clean=1)

        self.other['interval'] = interval
开发者ID:MarkTang,项目名称:erp5,代码行数:8,代码来源:TimerServer.py


注:本文中的ZPublisher.HTTPRequest.HTTPRequest.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。