# HG changeset patch # User catherine.devlin@gmail.com # Date 1311892339 14400 # Node ID 47301bf13ec3c6914681c19ce14e8811d2016685 # Parent 10c69502e789f366123c78a2984e04985451ca4c no packrat for python3, darn diff -r 10c69502e789 -r 47301bf13ec3 INSTALL.txt --- a/INSTALL.txt Thu Jul 28 17:46:18 2011 -0400 +++ b/INSTALL.txt Thu Jul 28 18:32:19 2011 -0400 @@ -19,4 +19,5 @@ sudo python3 distribute_setup.py sudo python3 setup.py install - + +2to3 won't run if there's a ``build`` directory that's newer than your source code. Deleting the ``cmd2/build`` directory before running setup.py ensures that this won't be a problem. diff -r 10c69502e789 -r 47301bf13ec3 cmd2.py --- a/cmd2.py Thu Jul 28 17:46:18 2011 -0400 +++ b/cmd2.py Thu Jul 28 18:32:19 2011 -0400 @@ -41,10 +41,24 @@ from code import InteractiveConsole, InteractiveInterpreter from optparse import make_option import pyparsing -pyparsing.ParserElement.enablePackrat() __version__ = '0.6.3' +if sys.version_info[0] == 2: + pyparsing.ParserElement.enablePackrat() + +""" +Packrat is causing Python3 errors that I don't understand. + +> /usr/local/Cellar/python3/3.2/lib/python3.2/site-packages/pyparsing-1.5.6-py3.2.egg/pyparsing.py(999)scanString() +-> nextLoc,tokens = parseFn( instring, preloc, callPreParse=False ) +(Pdb) n +NameError: global name 'exc' is not defined + +(Pdb) parseFn + +""" + class OptionParser(optparse.OptionParser): def exit(self, status=0, msg=None): self.values._exit = True