-
大小: 28.89MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-06-21
- 语言: Python
- 标签: ReviewBoard
资源简介
之前在windows下可以安装成功,相信对其他有兴趣使用reviewboard的人员也有帮助。这里Python 都是最新的2.7,ReviewBoard是最新的1.7.25
代码片段和文件信息
#!/usr/bin/env python
“““
client module for memcached (memory cache daemon)
Overview
========
See U{the MemCached homepage} for more about memcached.
Usage summary
=============
This should give you a feel for how this module operates::
import memcache
mc = memcache.Client([‘127.0.0.1:11211‘] debug=0)
mc.set(“some_key“ “Some value“)
value = mc.get(“some_key“)
mc.set(“another_key“ 3)
mc.delete(“another_key“)
mc.set(“key“ “1“) # note that the key used for incr/decr must be a string.
mc.incr(“key“)
mc.decr(“key“)
The standard way to use memcache with a database is like this::
key = derive_key(obj)
obj = mc.get(key)
if not obj:
obj = backend_api.get(...)
mc.set(obj)
# we now have obj and future passes through this code
# will use the object from the cache.
Detailed Documentation
======================
More detailed documentation is available in the L{Client} class.
“““
import sys
import socket
import time
import os
import re
import types
try:
import cPickle as pickle
except ImportError:
import pickle
try:
from zlib import compress decompress
_supports_compress = True
except ImportError:
_supports_compress = False
# quickly define a decompress just in case we recv compressed data.
def decompress(val):
raise _Error(“received compressed data but I don‘t support compession (import error)“)
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from binascii import crc32 # zlib version is not cross-platform
serverHashFunction = crc32
__author__ = “Evan Martin “
__version__ = “1.43“
__copyright__ = “Copyright (C) 2003 Danga Interactive“
__license__ = “Python“
SERVER_MAX_KEY_LENGTH = 250
# Storing values larger than 1MB requires recompiling memcached. If you do
# this value can be changed by doing “memcache.SERVER_MAX_VALUE_LENGTH = N“
# after importing this module.
SERVER_MAX_VALUE_LENGTH = 1024*1024
class _Error(Exception):
pass
try:
# Only exists in Python 2.4+
from threading import local
except ImportError:
# TODO: add the pure-python local implementation
class local(object):
pass
class Client(local):
“““
object representing a pool of memcache servers.
See L{memcache} for an overview.
In all cases where a key is used the key can be either:
1. A simple hashable type (string integer etc.).
2. A tuple of C{(hashvalue key)}. This is useful if you want to avoid
making this module calculate a hash value. You may prefer for
example to keep all of a given user‘s objects on the same memcache
server so you could use the user‘s unique id as the hash value.
@group Setup: __init__ set_servers forget_dead_hosts disconnect_all debuglog
@group Insertion: set add replace set_multi
@group Retrieval: get get_multi
@
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 142678 2014-05-06 15:25 RB\easy_install sc
文件 171508 2014-05-06 15:45 RB\mod_python-3.3.1.win32-py2.5-Apache2.2.exe
文件 71168 2012-09-18 15:16 RB\mod_wsgi-win32-ap22py27-3.3.so
文件 1063081 2014-05-06 15:34 RB\MySQL-python-1.2.4.win32-py2.7.exe
文件 507466 2014-05-06 15:37 RB\patch-2.5.9-7-setup.exe
文件 837844 2014-05-06 15:27 RB\PIL-1.1.7.win32-py2.7.exe
文件 4103138 2014-05-06 15:34 RB\py27-pysvn-svn1612-1.7.4-1321.exe
文件 972594 2014-05-06 15:28 RB\pycrypto-2.6.win32-py2.7.exe
文件 15913472 2012-09-11 15:35 RB\python-2.7.msi
文件 9006 2008-06-02 05:08 RB\python-memcached-1.43\ChangeLog
文件 39044 2008-06-02 05:08 RB\python-memcached-1.43\memcache.py
文件 37528 2008-06-02 05:08 RB\python-memcached-1.43\memcache.pyc
文件 280 2008-06-02 05:08 RB\python-memcached-1.43\PKG-INFO
文件 376 2008-06-02 05:08 RB\python-memcached-1.43\README
文件 104 2008-06-02 05:08 RB\python-memcached-1.43\setup.cfg
文件 938 2008-06-02 05:08 RB\python-memcached-1.43\setup.py
目录 0 2014-05-06 15:53 RB\python-memcached-1.43
文件 27591 2014-05-06 15:49 RB\python-memcached-latest.tar.gz
文件 3482722 2014-05-06 15:19 RB\ReviewBoard-1.7.25-py2.7.egg
文件 2943184 2014-05-06 15:23 RB\ReviewBoard-1.7.25.tar.gz
文件 2038876 2014-05-06 15:24 RB\sed-4.2.1-setup.exe
文件 256862 2014-05-06 15:22 RB\setuptools-0.6c11.tar.gz
文件 227956 2014-05-06 15:23 RB\setuptools-0.6c11.win32-py2.7.exe
目录 0 2014-05-06 15:53 RB
----------- --------- ---------- ----- ----
32847416 24
评论
共有 条评论