From 596cb9c7e287abbb98c64974fb4944d522cb6b5a Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 28 Apr 2012 18:02:01 +0200 Subject: Replaced print statement by print function (forward compatibility syntax). --- docs/_ext/applyxrefs.py | 6 +++--- docs/_ext/literals_to_xrefs.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/_ext') diff --git a/docs/_ext/applyxrefs.py b/docs/_ext/applyxrefs.py index 3809088c1f..14d18bd856 100644 --- a/docs/_ext/applyxrefs.py +++ b/docs/_ext/applyxrefs.py @@ -77,12 +77,12 @@ def main(argv=None): target_found, lines = has_target(fn) if not target_found: if testing: - print '%s: %s' % (fn, lines[0]), + print('%s: %s' % (fn, lines[0])) else: - print "Adding xref to %s" % fn + print("Adding xref to %s" % fn) process_file(fn, lines) else: print "Skipping %s: already has a xref" % fn if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file + sys.exit(main()) diff --git a/docs/_ext/literals_to_xrefs.py b/docs/_ext/literals_to_xrefs.py index 569193c72d..d1487ca729 100644 --- a/docs/_ext/literals_to_xrefs.py +++ b/docs/_ext/literals_to_xrefs.py @@ -136,10 +136,10 @@ def colorize(text='', opts=(), **kwargs): colorize('hello', fg='red', bg='blue', opts=('blink',)) colorize() colorize('goodbye', opts=('underscore',)) - print colorize('first line', fg='red', opts=('noreset',)) - print 'this should be red too' - print colorize('and so should this') - print 'this should not be red' + print(colorize('first line', fg='red', opts=('noreset',))) + print('this should be red too') + print(colorize('and so should this')) + print('this should not be red') """ color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = dict([(color_names[x], '3%s' % x) for x in range(8)]) @@ -168,4 +168,4 @@ if __name__ == '__main__': try: fixliterals(sys.argv[1]) except (KeyboardInterrupt, SystemExit): - print \ No newline at end of file + print('') -- cgit v1.3