gbp.tristate.Tristate(object)
class documentationgbp.tristate
(View In Hierarchy)
Tri-state value: on, off or auto
Class Variable | ON | Undocumented |
Class Variable | OFF | Undocumented |
Class Variable | AUTO | Undocumented |
Method | __init__ | Undocumented |
Method | __repr__ | No summary |
Method | __nonzero__ | No summary |
Method | state | Get current state |
Method | is_auto | Undocumented |
Method | is_on | Undocumented |
Method | is_off | Undocumented |
Method | do | Run function if tristate is on or auto, only report a failure if tristate is on since failing is o.k. for autodetect. |
Class Variable | _VALID_NAMES | Undocumented |
Instance Variable | _state | Undocumented |
>>> Tristate('on').__repr__() 'on' >>> Tristate(True).__repr__() 'on' >>> Tristate(False).__repr__() 'off' >>> Tristate('auto').__repr__() 'auto'