Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.support.python_compatibility Namespace Reference

Classes

class  partial

Functions

def hmac_new
def hash_new

Variables

tuple min_req_exc = Exception("Minimum requirement for MoinMoin is Python 2.4.")
 rsplit = string.rsplit
 sorted = sorted
 set = set
 frozenset = frozenset
 hash_new = hashlib.new

Detailed Description

MoinMoin - Support Package

Stuff for compatibility with older Python versions

@copyright: 2007 Heinrich Wendel <heinrich.wendel@gmail.com>,
            2009 MoinMoin:ThomasWaldmann
@license: GNU GPL, see COPYING for details.

Function Documentation

def MoinMoin.support.python_compatibility.hash_new (   name,
  string = '' 
)

Definition at line 56 of file python_compatibility.py.

00056 
00057     def hash_new(name, string=''):
00058         if name in ('SHA1', 'sha1'):
00059             return sha.new(string)
00060         elif name in ('MD5', 'md5'):
00061             import md5
00062             return md5.new(string)
00063         raise ValueError("unsupported hash type")

Here is the call graph for this function:

def MoinMoin.support.python_compatibility.hmac_new (   key,
  msg,
  digestmod = hashlib.sha1 
)

Definition at line 51 of file python_compatibility.py.

00051 
00052     def hmac_new(key, msg, digestmod=hashlib.sha1):
00053         return hmac.new(key, msg, digestmod)

Here is the caller graph for this function:


Variable Documentation

Definition at line 26 of file python_compatibility.py.

Definition at line 50 of file python_compatibility.py.

tuple MoinMoin.support.python_compatibility.min_req_exc = Exception("Minimum requirement for MoinMoin is Python 2.4.")

Definition at line 11 of file python_compatibility.py.

Definition at line 15 of file python_compatibility.py.

Definition at line 25 of file python_compatibility.py.

Definition at line 20 of file python_compatibility.py.