summaryrefslogtreecommitdiff
path: root/examples/sparser.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2019-01-09 17:18:22 -0600
committerptmcg <ptmcg@austin.rr.com>2019-01-09 17:18:22 -0600
commitd626c99b6288afc4708d72f668b45a29d3263d22 (patch)
tree4cbeca134437387022e59b71631246e178393aca /examples/sparser.py
parente9ef507bf1fd41d4bd3ffb0c193e5889254ba340 (diff)
downloadpyparsing-git-d626c99b6288afc4708d72f668b45a29d3263d22.tar.gz
Add enumerated place holders for strings that invoke str.format(), for Py2 compatibility
Diffstat (limited to 'examples/sparser.py')
-rw-r--r--examples/sparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/sparser.py b/examples/sparser.py
index a7027eb..d4604da 100644
--- a/examples/sparser.py
+++ b/examples/sparser.py
@@ -77,12 +77,12 @@ def msg(txt):
def debug(ftn, txt):
"""Used for debugging."""
if debug_p:
- sys.stdout.write("{}.{}:{}\n".format(modname, ftn, txt))
+ sys.stdout.write("{0}.{1}:{2}\n".format(modname, ftn, txt))
sys.stdout.flush()
def fatal(ftn, txt):
"""If can't continue."""
- msg = "{}.{}:FATAL:{}\n".format(modname, ftn, txt)
+ msg = "{0}.{1}:FATAL:{2}\n".format(modname, ftn, txt)
raise SystemExit(msg)
def usage():
@@ -116,7 +116,7 @@ class ParseFileLineByLine:
compressed. Compression is deduced from the file name suffixes '.Z'
(compress/uncompress), '.gz' (gzip/gunzip), and '.bz2' (bzip2).
- The parse definition file name is developed based on the input file name.
+ The parse definition fi le name is developed based on the input file name.
If the input file name is 'basename.ext', then the definition file is
'basename_def.ext'. If a definition file specific to the input file is not
found, then the program searches for the file 'sparse.def' which would be