Package kiwi :: Module python
[frames | no frames]

Module kiwi.python

Generic python addons
Classes
ClassInittableMetaType  
ClassInittableObject I am an object which will call a classmethod called __class_init__ when I am created.
enum enum is an enumered type implementation in python.
Settable A mixin class for syntactic sugar.

Function Summary
  all(seq)
Return true if all items in seq are True
  any(seq)
Return true if any item in seq is True
  clamp(x, low, high)
Ensures that x is between the limits set by low and high.
  deprecationwarn(msg, stacklevel)
Prints a deprecation warning
  disabledeprecationcall(func, *args, **kwargs)
Disables all deprecation warnings during the function call to func
  namedAny(name)
Get a fully named package, module, module-global object, or attribute.
  qual(klass)
Return fully qualified module and class name
  slicerange(slice, limit)
Takes a slice object and returns a range iterator

Function Details

all(seq)

Returns:
True if all items in seq are True

any(seq)

Returns:
True if any item in seq is True

clamp(x, low, high)

Ensures that x is between the limits set by low and high. For example, * clamp(5, 10, 15) is 10. * clamp(15, 5, 10) is 10. * clamp(20, 15, 25) is 20.
Parameters:
x - the value to clamp.
low - the minimum value allowed.
high - the maximum value allowed.
Returns:
the clamped value

deprecationwarn(msg, stacklevel=2)

Prints a deprecation warning

disabledeprecationcall(func, *args, **kwargs)

Disables all deprecation warnings during the function call to func

namedAny(name)

Get a fully named package, module, module-global object, or attribute.
Parameters:
name -
Returns:
object, module or attribute

qual(klass)

Returns:
fully qualified module and class name

slicerange(slice, limit)

Takes a slice object and returns a range iterator
Parameters:
slice - slice object
limit - maximum value allowed
Returns:
iterator

Generated by Epydoc 2.1 on Mon Jan 29 16:46:04 2007 http://epydoc.sf.net