From: Martin Ling Date: Tue, 17 Dec 2013 13:01:35 +0000 (+0000) Subject: python: Add ConfigKey.info and ConfigKey. shortcuts. X-Git-Tag: libsigrok-0.3.0~435 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cad0acef5d21fefc4c5dd4c284d91f7be3f7deeb;p=libsigrok.git python: Add ConfigKey.info and ConfigKey. shortcuts. --- diff --git a/bindings/python/sigrok/core/classes.py b/bindings/python/sigrok/core/classes.py index 5f38028f..6b5325ba 100644 --- a/bindings/python/sigrok/core/classes.py +++ b/bindings/python/sigrok/core/classes.py @@ -608,4 +608,9 @@ for symbol_name in dir(lowlevel): if symbol_name.startswith(prefix): name = symbol_name[len(prefix):] value = getattr(lowlevel, symbol_name) - setattr(cls, name, cls(value)) + obj = cls(value) + setattr(cls, name, obj) + if cls is ConfigKey: + obj.info = ConfigInfo(obj) + if obj.info: + setattr(cls, obj.info.id, obj)