This package consists of a collection of useful classes and functions. Most of the elements are taurus independent and can be used generically.
This module contains a python implementation of
json. This was done because
json only became part of python since version 2.6.
The json implementation follows the rule:
if python >= 2.6 use standard json from python distribution
otherwise use private implementation distributed with taurus
This function returns a callable weak reference to a callable object. Object can be a callable object, a function or a method.
critical(msg, *args, **kw)¶
debug(msg, *args, **kw)¶
deprecation_decorator(func=None, alt=None, rel=None, dbg_msg=None)¶
decorator to mark methods as deprecated
Translates a sequence into a dictionary by converting each to elements of the sequence (k,v) into a k:v pair in the dictionary
sequence) – any sequence object
- Return type
dictionary built from the given sequence
error(msg, *args, **kw)¶
fatal(msg, *args, **kw)¶
This method will print a recursive dict in a tree-like shape:
Finds out user inf (currently just the logged user name) for Windows and Posix machines. sets a USER_NAME variable containing the logged user name defines a UNKNOWN_USER variable to which username falls back.
- Return type
current user name
info(msg, *args, **kw)¶
Decorator to simplify the use of property. Like @property for attrs who need more than a getter. For getter only property use @property.
adapted from http://code.activestate.com/recipes/502243/
Decorator to make thread-safe class members Decorator to create thread-safe objects.
With Lock() this decorator should not be used to decorate nested functions; it will cause Deadlock!
With RLock this problem is avoided … but you should rely more on python threading
trace(msg, *args, **kw)¶
warning(msg, *args, **kw)¶