summaryrefslogtreecommitdiff
path: root/docs/_ext
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-04-28 18:02:01 +0200
committerClaude Paroz <claude@2xlibre.net>2012-04-30 20:45:03 +0200
commit596cb9c7e287abbb98c64974fb4944d522cb6b5a (patch)
treee8ad5402dd233458b392d1822146bb1102ba74a6 /docs/_ext
parentfe43ad5707d116bb1729bc17a24ca16c90ae040d (diff)
Replaced print statement by print function (forward compatibility syntax).
Diffstat (limited to 'docs/_ext')
-rw-r--r--docs/_ext/applyxrefs.py6
-rw-r--r--docs/_ext/literals_to_xrefs.py10
2 files changed, 8 insertions, 8 deletions
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('')