# the default if saved_value is 'None' (default)
# or invalid.
#
-class ConfigElement:
+class ConfigElement(object):
def __init__(self):
self.saved_value = None
self.last_value = None
assert key in KEY_NUMBERS
return key - KEY_0
-class choicesList: # XXX: we might want a better name for this
+class choicesList(object): # XXX: we might want a better name for this
LIST_TYPE_LIST = 1
LIST_TYPE_DICT = 2
if self.hidden:
text = len(text) * self.censor_char
return (mtext, text, mark)
-
+
def onSelect(self, session):
ConfigText.onSelect(self, session)
self.hidden = False
# config.saved_value == {"foo": {"bar": "True"}, "foobar": "False"}
#
-class ConfigSubsectionContent:
+class ConfigSubsectionContent(object):
pass
# we store a backup of the loaded configuration
# config.dipswitches.append(ConfigYesNo())
# config.dipswitches.append(ConfigYesNo())
# config.dipswitches.append(ConfigYesNo())
-class ConfigSubList(list):
+class ConfigSubList(list, object):
def __init__(self):
list.__init__(self)
self.stored_values = {}
# care must be taken that the 'key' has a proper
# str() method, because it will be used in the config
# file.
-class ConfigSubDict(dict):
+class ConfigSubDict(dict, object):
def __init__(self):
dict.__init__(self)
self.stored_values = {}
# __setattr__.
# If you don't understand this, try adding
# __setattr__ to a usual exisiting class and you will.
-class ConfigSubsection:
+class ConfigSubsection(object):
def __init__(self):
self.__dict__["content"] = ConfigSubsectionContent()
self.content.items = { }