summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2016-12-09 23:32:34 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2016-12-09 23:32:34 -0500
commite9a15b67970fa030d43089c4dc38f22dd89f0ba7 (patch)
tree55e1a086b257ec2f0147beb7aab3f4cf2b251115 /cmd2.py
parenta877819f54a95ba6add0c9cf10d94dd127b0b627 (diff)
downloadcmd2-git-e9a15b67970fa030d43089c4dc38f22dd89f0ba7.tar.gz
Enabling packrat for all parsing in both Python 2 and Python 3 since that bug was from a very old version of pyparsing and Python 3.2
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/cmd2.py b/cmd2.py
index 606eed8c..68304d82 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -70,23 +70,8 @@ except ImportError:
__version__ = '0.7.0'
-# Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3
-if six.PY2:
- 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}>
-
-Bug report filed: https://sourceforge.net/tracker/?func=detail&atid=617311&aid=3381439&group_id=97203
-"""
+# Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past
+pyparsing.ParserElement.enablePackrat()
class OptionParser(optparse.OptionParser):