Dispatches a string command to a method.
(self, args)
| 33 | executed directly, or dispatched from an argument list.""" |
| 34 | |
| 35 | def Dispatch(self, args): |
| 36 | """Dispatches a string command to a method.""" |
| 37 | if len(args) < 1: |
| 38 | raise Exception("Not enough arguments") |
| 39 | |
| 40 | method = "Exec%s" % self._CommandifyName(args[0]) |
| 41 | return getattr(self, method)(*args[1:]) |
| 42 | |
| 43 | def _CommandifyName(self, name_string): |
| 44 | """Transforms a tool name like copy-info-plist to CopyInfoPlist""" |