安装指南:http://www.cnblogs.com/longsan/articles/1282098.html
Genshi-0.5.1.win32-py2.5.exehttp://genshi.edgewall.org/wiki/Downloadsvn-python-1.5.6.win32-py2.5.exe:http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8637&expandFolder=8637&folderID=469
(备注:安装svn-python后,必须将SVN根目录下的dll文件复制到Python25/Lib/site-packages/libsvn)
http://initd.org/pub/software/pysqlite/releases/2.4/2.4.1/setuptools-0.6c7.win32-py2.5.exehttp://pypi.python.org/pypi/setuptools/0.6c7Trac-0.11.4.win32.exehttp://trac.edgewall.org/wiki/TracDownloadaccountmanagerplugin_trunk-r5655.ziphttp://trac-hacks.org/wiki/AccountManagerPlugin
#####tony.wu : trac-digest.py
from optparse import OptionParser# The md5 module is deprecated in Python 2.5try: from hashlib import md5except ImportError: from md5 import md5realm = 'trac'
# build the optionsusage = "usage: %prog [options]"parser = OptionParser(usage=usage)parser.add_option("-u", "--username",action="store", dest="username", type = "string", help="the username for whom to generate a password")parser.add_option("-p", "--password",action="store", dest="password", type = "string", help="the password to use")parser.add_option("-r", "--realm",action="store", dest="realm", type = "string", help="the realm in which to create the digest")(options, args) = parser.parse_args()
# check optionsif (options.username is None) or (options.password is None): parser.error("You must supply both the username and password")if (options.realm is not None): realm = options.realm # Generate the string to enter into the htdigest filekd = lambda x: md5(':'.join(x)).hexdigest()print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
转载于:https://www.cnblogs.com/setsailwu/archive/2009/05/04/3852281.html
