diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
commit | 7c6dd0eee627772485f8b06470ac84adc0f077f6 (patch) | |
tree | 69a28021c01029c221f78be31c4cb0335922ebfe /src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions | |
parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
parent | baee03c569c91b745a1e025660b19a718db16e7d (diff) |
Updated version 3.0.0 from 'upstream/3.0.0'
with Debian dir 147caafe8506326dfd094432b42ae32c21ed284e
Diffstat (limited to 'src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions')
-rw-r--r-- | src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py | 11 | ||||
-rw-r--r-- | src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/xslt.py | 13 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py index c070602..e7b8cfa 100644 --- a/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py +++ b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/docbook.py @@ -1,5 +1,6 @@ # docbook.py: extension module # $Id: docbook.py 8353 2009-03-17 16:57:50Z mzjn $ +from __future__ import print_function import sys import string @@ -82,7 +83,7 @@ def adjustColumnWidths(ctx, nodeset): relParts.append(relPart) absParts.append(pixels) - col = col.next + col = col.__next__ # Ok, now we have the relative widths and absolute widths in # two parallel arrays. @@ -116,7 +117,7 @@ def adjustColumnWidths(ctx, nodeset): pixelWidth = convertLength(tableWidth) if pixelWidth <= absTotal: - print "Table is wider than table width" + print("Table is wider than table width") else: pixelWidth = pixelWidth - absTotal @@ -151,7 +152,7 @@ def adjustColumnWidths(ctx, nodeset): col.setProp("width", widths[count]) count = count+1 - col = col.next + col = col.__next__ return nodeset @@ -163,10 +164,10 @@ def convertLength(length): m = re.search('([+-]?[\d\.]+)(\S+)', length) if m != None and m.lastindex > 1: unit = pixelsPerInch - if unitHash.has_key(m.group(2)): + if m.group(2) in unitHash: unit = unitHash[m.group(2)] else: - print "Unrecognized length: " + m.group(2) + print("Unrecognized length: " + m.group(2)) pixels = unit * float(m.group(1)) else: diff --git a/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/xslt.py b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/xslt.py index c712f65..77ca0de 100644 --- a/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/xslt.py +++ b/src/engine/SCons/Tool/docbook/docbook-xsl-1.76.1/extensions/xslt.py @@ -1,5 +1,6 @@ #!/usr/bin/python -u # $Id: xslt.py 8353 2009-03-17 16:57:50Z mzjn $ +from __future__ import print_function import sys import libxml2 @@ -18,7 +19,7 @@ try: xmlfile = sys.argv[1] xslfile = sys.argv[2] except IndexError: - print usage + print(usage) sys.exit(1) def quote(astring): @@ -38,12 +39,12 @@ try: while (sys.argv[count]): try: name, value = sys.argv[count].split("=", 2) - if params.has_key(name): - print "Warning: '%s' re-specified; replacing value" % name + if name in params: + print("Warning: '%s' re-specified; replacing value" % name) params[name] = quote(value) except ValueError: - print "Invalid parameter specification: '" + sys.argv[count] + "'" - print usage + print("Invalid parameter specification: '" + sys.argv[count] + "'") + print(usage) sys.exit(1) count = count+1 except IndexError: @@ -70,7 +71,7 @@ result = style.applyStylesheet(doc, params) if outfile: style.saveResultToFilename(outfile, result, 0) else: - print result + print(result) # Free things up style.freeStylesheet() |