diff options
| author | Catherine Devlin <catherine.devlin@gmail.com> | 2011-07-28 18:32:19 -0400 |
|---|---|---|
| committer | Catherine Devlin <catherine.devlin@gmail.com> | 2011-07-28 18:32:19 -0400 |
| commit | d0d163335304d3fb754a7be820e24541d61dff80 (patch) | |
| tree | bcfd6e07c68fe4f85bd090dbcc172bf285eaf04e /cmd2.py | |
| parent | 3ce13c38df8bf2145db9663cce11553302c61af9 (diff) | |
| download | cmd2-git-d0d163335304d3fb754a7be820e24541d61dff80.tar.gz | |
no packrat for python3, darn
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -41,10 +41,24 @@ import copy 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 +<bound method Or._parseCache of {Python style comment ^ C style comment}> +""" + class OptionParser(optparse.OptionParser): def exit(self, status=0, msg=None): self.values._exit = True |
