# HG changeset patch # User catherine@bothari # Date 1264334376 18000 # Node ID f5593299fc2a2d999516574f2a6bed2b94d802df # Parent e7c89e34b39b4424999dbed8cf672466a173daba debugged snarl in saving .parser diff -r e7c89e34b39b -r f5593299fc2a cmd2.py --- a/cmd2.py Fri Jan 22 04:46:15 2010 -0500 +++ b/cmd2.py Sun Jan 24 06:59:36 2010 -0500 @@ -128,7 +128,7 @@ return if hasattr(opts, '_exit'): return None - if hasattr(arg, 'parser'): + if hasattr(arg, 'parsed'): terminator = arg.parsed.terminator try: if arg.parsed.terminator[0] == '\n': @@ -323,7 +323,7 @@ reserved_words = [] feedback_to_output = False # Do include nonessentials in >, | output quiet = False # Do not suppress nonessential output - debug = False + debug = True settable = ''' prompt continuation_prompt @@ -642,6 +642,7 @@ result['expanded'] = s p = ParsedString(result.clean) p.parsed = result + p.parser = self.parsed for (key, val) in kwargs.items(): p.parsed[key] = val return p @@ -730,6 +731,7 @@ funcname = self.func_named(statement.parsed.command) full_statement = ParsedString(statement.parsed.raw) full_statement.parsed = statement.parsed + full_statement.parser = statement.parser if not funcname: return self.postparsing_postcmd(self.default(full_statement)) try: diff -r e7c89e34b39b -r f5593299fc2a setup.py --- a/setup.py Fri Jan 22 04:46:15 2010 -0500 +++ b/setup.py Sun Jan 24 06:59:36 2010 -0500 @@ -5,6 +5,7 @@ name="cmd2", version="0.5.6", py_modules=["cmd2",], + use2to3=True, # metadata for upload to PyPI author = 'Catherine Devlin',