session.py

来自「python web programming 部分」· Python 代码 · 共 21 行

PY
21
字号
#
# $Workfile: Session.py $ $Revision: 2 $
# $Date: 9/12/01 10:53a $ $Author: Sholden $
#
import time

class Session:
    """Session object, for use by server and application code.

    Server uses only names beginning with an underscore."""

    def __init__(self, sessid):
        self._id = sessid
        self._auth = {}                 # Authentication details, one per realm
        self._ctime = time.time()       # Creation time
        self._atime = self._ctime       # Access time
        self._fd = None                 # Form description
        self._secureform = 0            # Form IDs must match if true
        self._bookings = []             # Shopping cart
        

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?