diff options
author | catherine devlin <catherine.devlin@gmail.com> | 2010-09-21 15:25:56 -0400 |
---|---|---|
committer | catherine devlin <catherine.devlin@gmail.com> | 2010-09-21 15:25:56 -0400 |
commit | 7b1f5fbab4d5411cde4531d279c738a484e282e8 (patch) | |
tree | 7ef9dfb11e5ac3b9e1d62e5771d5e22efcd6a4fb | |
parent | b4027111f5327d8f8d4d2071aff0e28afc286c48 (diff) | |
download | cmd2-hg-7b1f5fbab4d5411cde4531d279c738a484e282e8.tar.gz |
added postparse
-rwxr-xr-x | cmd2.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -702,7 +702,9 @@ class Cmd(cmd.Cmd): def preparse(self, raw, **kwargs): return raw - + def postparse(self, parseResult): + return parseResult + def parsed(self, raw, **kwargs): if isinstance(raw, ParsedString): p = raw @@ -718,6 +720,7 @@ class Cmd(cmd.Cmd): result = self.parser.parseString(s) result['raw'] = raw result['command'] = result.multilineCommand or result.command + result = self.postparse(result) p = ParsedString(result.args) p.parsed = result p.parser = self.parsed |