Package qm :: Package external :: Package DocumentTemplate :: Module pDocumentTemplate :: Class TemplateDict
[hide private]
[frames] | no frames]

Class TemplateDict
source code

Nested Classes [hide private]
DateTime DateTime objects represent instants in time and provide interfaces for controlling its representation without affecting the absolute value of the object.
float float(x) -> floating point number
int int(x[, base]) -> integer
str str(object) -> string

Instance Methods [hide private]
  _pop(self, n=1)
  _push(self, d)
  __init__(self)
  __getitem__(self, key, call=1, simple=<built-in method has_key of dict object at 0xb7a95604>, isFunctionType=<built-in method has_key of dict object at 0xb7a9579c>)
  has_key(self, key)
  getitem(self, key, call=1, simple=<built-in method has_key of dict object at 0xb7a95604>, isFunctionType=<built-in method has_key of dict object at 0xb7a9579c>)
  __call__(self, *args, **kw)
  abs(number)
Return the absolute value of the argument.
  attr(self, inst, name, md)
  chr(i)
Return a string of one character with ordinal i; 0 <= i < 256.
  divmod(x, y)
Return the tuple ((x-x%y)/y, x%y).
  getattr(md, inst, name, default=_marker)
  hasattr(md, inst, name)
  hash(object)
Return a hash value for the object.
  hex(number)
Return the hexadecimal representation of an integer or long integer.
  len(object)
Return the number of items of a sequence or mapping.
  max(sequence)
max(a, b, c, ...) -> value
  min(sequence)
min(a, b, c, ...) -> value
  namespace(self, **kw)
Create a tuple consisting of a single instance whose attributes are provided as keyword arguments.
  oct(number)
Return the octal representation of an integer or long integer.
  ord(c)
Return the integer ordinal of a one-character string.
  pow(self, x, y, z)
  range(md, iFirst, *args)
  render(self, v)
Render an object in the way done by the 'name' attribute
  reorder(self, s, with=None, without=())
  round(number, ndigits=...)
Round a number to a given precision in decimal digits (default 0 digits).
  test(self, *args)

Class Variables [hide private]
level  
None  
math This module is always available.
random Random variable generators.
string A collection of string operations (most are no longer used).

Method Details [hide private]

_pop(self, n=1)

source code 

_push(self, d)

source code 

__init__(self)
(Constructor)

source code 

__getitem__(self, key, call=1, simple=<built-in method has_key of dict object at 0xb7a95604>, isFunctionType=<built-in method has_key of dict object at 0xb7a9579c>)
(Indexing operator)

source code 

has_key(self, key)

source code 

getitem(self, key, call=1, simple=<built-in method has_key of dict object at 0xb7a95604>, isFunctionType=<built-in method has_key of dict object at 0xb7a9579c>)

source code 

__call__(self, *args, **kw)
(Call operator)

source code 

abs(number)

 
Return the absolute value of the argument.
Returns:
number

attr(self, inst, name, md)

source code 

chr(i)

 
Return a string of one character with ordinal i; 0 <= i < 256.
Returns:
character

divmod(x, y)

 
Return the tuple ((x-x%y)/y, x%y). Invariant: div*y + mod == x.
Returns:
(div, mod)

getattr(md, inst, name, default=_marker)

source code 

hasattr(md, inst, name)

source code 

hash(object)

 
Return a hash value for the object. Two objects with the same value have the same hash value. The reverse is not necessarily true, but likely.
Returns:
integer

hex(number)

 
Return the hexadecimal representation of an integer or long integer.
Returns:
string

len(object)

 
Return the number of items of a sequence or mapping.
Returns:
integer

max(sequence)

 

max(a, b, c, ...) -> value

With a single sequence argument, return its largest item. With two or more arguments, return the largest argument.
Returns:
value

min(sequence)

 

min(a, b, c, ...) -> value

With a single sequence argument, return its smallest item. With two or more arguments, return the smallest argument.
Returns:
value

namespace(self, **kw)

source code 
Create a tuple consisting of a single instance whose attributes are provided as keyword arguments.

oct(number)

 
Return the octal representation of an integer or long integer.
Returns:
string

ord(c)

 
Return the integer ordinal of a one-character string.
Returns:
integer

pow(self, x, y, z)

source code 

range(md, iFirst, *args)

source code 

render(self, v)

source code 
Render an object in the way done by the 'name' attribute

reorder(self, s, with=None, without=())

source code 

round(number, ndigits=...)

 
Round a number to a given precision in decimal digits (default 0 digits). This always returns a floating point number. Precision may be negative.
Returns:
floating point number

test(self, *args)

source code 

Class Variable Details [hide private]

level

Value:
0                                                                     
      

None

Value:
{}                                                                     
      

math

This module is always available. It provides access to the mathematical functions defined by the C standard.
Value:
<module 'math' from '/usr/lib/python2.4/lib-dynload/mathmodule.so'>    
      

random

Random variable generators.

    integers
    --------
           uniform within range

    sequences
    ---------
           pick random element
           pick random sample
           generate random permutation

    distributions on the real line:
    ------------------------------
           uniform
           normal (Gaussian)
           lognormal
           negative exponential
           gamma
           beta
           pareto
           Weibull

    distributions on the circle (angles 0 to 2pi)
    ---------------------------------------------
           circular uniform
           von Mises

General notes on the underlying Mersenne Twister core generator:

* The period is 2**19937-1.
* It is one of the most extensively tested generators in existence.
* Without a direct way to compute N steps forward, the semantics of
  jumpahead(n) are weakened to simply jump to another distant state and rely
  on the large period to avoid overlapping sequences.
* The random() method is implemented in C, executes in a single Python step,
  and is, therefore, threadsafe.

Value:
<module 'random' from '/usr/lib/python2.4/random.pyc'>                 
      

string

A collection of string operations (most are no longer used).

Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is now obsolete itself.

Public module variables:

whitespace -- a string containing all characters considered whitespace lowercase -- a string containing all characters considered lowercase letters uppercase -- a string containing all characters considered uppercase letters letters -- a string containing all characters considered letters digits -- a string containing all characters considered decimal digits hexdigits -- a string containing all characters considered hexadecimal digits octdigits -- a string containing all characters considered octal digits punctuation -- a string containing all characters considered punctuation printable -- a string containing all characters considered printable
Value:
<module 'string' from '/usr/lib/python2.4/string.pyc'>