summaryrefslogtreecommitdiff
path: root/src/examples/invRegex.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2012-11-23 08:54:10 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2012-11-23 08:54:10 +0000
commit774e46526945ea91265734a2dc82d15eed515577 (patch)
tree734ae210c20a98f01fe029f7e6eeb7a93b4617fb /src/examples/invRegex.py
parent6b12041d4656f4cda910f24acda8d71013166fbd (diff)
downloadpyparsing-git-774e46526945ea91265734a2dc82d15eed515577.tar.gz
Clean up examples to be Python 3 compatible
Diffstat (limited to 'src/examples/invRegex.py')
-rw-r--r--src/examples/invRegex.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/examples/invRegex.py b/src/examples/invRegex.py
index 6493974..965fe8f 100644
--- a/src/examples/invRegex.py
+++ b/src/examples/invRegex.py
@@ -234,17 +234,17 @@ def main():
for t in tests:
t = t.strip()
if not t: continue
- print '-'*50
- print t
+ print('-'*50)
+ print(t)
try:
- print count(invert(t))
+ print(count(invert(t)))
for s in invert(t):
- print s
- except ParseFatalException,pfe:
- print pfe.msg
- print
+ print(s)
+ except ParseFatalException as pfe:
+ print(pfe.msg)
+ print()
continue
- print
+ print()
if __name__ == "__main__":
- main() \ No newline at end of file
+ main()