- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
def _registerCommands(self, mapping=None, dataMapping=None, commandUpdates=None, dataUpdates=None):
...
for (cmdName, cmdClass) in cMap.iteritems():
...
self._setCommand(cmdObj)
def _setCommand(self, cmdObj):
if cmdObj.__class__.__name__.find("_") != -1:
name = unicode(cmdObj.__class__.__name__.split("_", 1)[1])
else:
name = unicode(cmdObj.__class__.__name__).lower()
setattr(self, name.lower(), cmdObj)
...
Комментарии (0) RSS
Добавить комментарий