X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=scripts%2Fyaptu.py;h=734d748a02dc6af8dec3e3a8ae4d6de6ec096a6e;hp=cffb19050ce6d1272e9dae94ebfc4a52c7ee131b;hb=ab655d5afacd562f817cfc4ca821ab61c7de2188;hpb=8643e3cba4f229faba5d1aeb9a7b31ba609f81fb diff --git a/scripts/yaptu.py b/scripts/yaptu.py index cffb1905..734d748a 100644 --- a/scripts/yaptu.py +++ b/scripts/yaptu.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Yet Another Python Templating Utility, Version 1.2, by Alex Martelli. Distributed under PSF license (http://docs.python.org/license.html). @@ -33,7 +33,7 @@ class copier: def repl(match, self=self): "return the eval of a found expression, for replacement" # uncomment for debug: - # print '!!! replacing',match.group(1) + # print('!!! replacing',match.group(1)) expr = self.preproc(match.group(1), 'eval') try: return str(eval(expr, self.globals, self.locals)) except: return str(self.handle(expr)) @@ -65,7 +65,7 @@ class copier: stat = self.preproc(stat, 'exec') stat = '%s _cb(%s,%s)' % (stat,i+1,j) # for debugging, uncomment...: - # print "-> Executing: {"+stat+"}" + # print("-> Executing: {"+stat+"}") exec(stat, self.globals, self.locals) i=j+1 else: # normal line, just copy with substitution