# HG changeset patch # User Thinker K.F. Li # Date 1295454848 -28800 # Node ID cfbc0f3e54e338930831af39672bbc600830b5fe # Parent 8c0a4684c1f7777ae253c01f51a56083f25649f8 Add supporting for programmer defined prefix for data_monitor diff -r 8c0a4684c1f7 -r cfbc0f3e54e3 pyink/data_monitor.py --- a/pyink/data_monitor.py Wed Jan 19 18:47:40 2011 +0800 +++ b/pyink/data_monitor.py Thu Jan 20 00:34:08 2011 +0800 @@ -48,8 +48,13 @@ pass return sentinel + monitor_prefix = 'do' + if clazz_dict.has_key('__data_monitor_prefix__'): + monitor_prefix = clazz_dict['__data_monitor_prefix__'] + pass + for attr_name in clazz_dict: - if (not attr_name.startswith('do')) or \ + if (not attr_name.startswith(monitor_prefix)) or \ (not callable(clazz_dict[attr_name])): continue clazz_dict[attr_name] = \