Mercurial > hg > MakeItSo
diff makeitso/makeitso.py @ 267:7e3a32f2794a
py3 fixes
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 27 Apr 2018 14:07:46 -0700 |
parents | f10f5beb8ad1 |
children | 64979cfff465 |
line wrap: on
line diff
--- a/makeitso/makeitso.py Fri Sep 01 09:40:59 2017 -0700 +++ b/makeitso/makeitso.py Fri Apr 27 14:07:46 2018 -0700 @@ -150,7 +150,7 @@ try: tempita.Template.substitute(self, **vars) return missing - except NameError, e: + except NameError as e: missed = get_missing(e) missing.add(missed) vars[missed] = '' @@ -182,7 +182,7 @@ """read variables from stdin""" retval = {} for i in variables: - print 'Enter %s: ' % i, + print ('Enter %s: ' % i) retval[i] = raw_input() return retval @@ -452,7 +452,7 @@ description = getattr(template_class, 'description', '') description = description or getattr(template_class, '__doc__', '') description = description.strip() - print key + ': ' + description + print (key + ': ' + description) return # print the variables for the templates @@ -469,7 +469,7 @@ # print them for variable in sorted(variables): - print variable + print (variable) return # template variables @@ -498,9 +498,9 @@ if options.commandline: if args: for arg in args: - print invocation(arg, **variables) + print (invocation(arg, **variables)) else: - print invocation('[URI]', **variables) + print (invocation('[URI]', **variables)) return @@ -511,7 +511,7 @@ template.substitute({}, output=options.output) else: template = ContentTemplate(sys.stdin.read(), variables=variables) - print template.substitute() + print (template.substitute()) # cleanup cleanup()