# HG changeset patch # User catherine.devlin@gmail.com # Date 1285097156 14400 # Node ID 3397b9c199f58b7e971a2a8071ca93835886dab4 # Parent 2fccf9c87fe790f165c6ec12d0b055422631d585 added postparse diff -r 2fccf9c87fe7 -r 3397b9c199f5 cmd2.py --- a/cmd2.py Mon Sep 20 00:59:39 2010 -0400 +++ b/cmd2.py Tue Sep 21 15:25:56 2010 -0400 @@ -702,7 +702,9 @@ 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 @@ 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