Package conary :: Package lib :: Module util :: Class ProtectedTemplate
[hide private]
[frames] | no frames]

Class ProtectedTemplate

source code

object --+        
         |        
basestring --+    
             |    
           str --+
                 |
                ProtectedTemplate

A string template that hides parts of its components. The first argument is a template (see string.Template for a complete documentation). The values that can be filled in are using the format ${VAR} or $VAR. The keyword arguments are expanding the template. If one of the keyword arguments has a __safe_str__ method, its value is going to be hidden when this object's __safe_str__ is called.

Instance Methods [hide private]
 
__safe_str__(self) source code

Inherited from str: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __repr__, __rmod__, __rmul__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, replace, rfind, rindex, rjust, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from object: __delattr__, __init__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]
 
__new__(cls, templ, **kwargs)
Returns: a new object with type S, a subtype of T
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, templ, **kwargs)
Static Method

source code 
Returns:
a new object with type S, a subtype of T

Overrides: str.__new__
(inherited documentation)