This does not work as-is with Python 2.4.6.

https://codereview.appspot.com/573160047/diff/581230043/scripts/build/output-distance.py
File scripts/build/output-distance.py (right):

https://codereview.appspot.com/573160047/diff/581230043/scripts/build/output-distance.py#newcode424
scripts/build/output-distance.py:424: class_attr2 = (' class="%s"' %
class_attr2) if class_attr2 else ''
This syntax is not available (yet) in Python 2.4, you have to spell it
out :-(

https://codereview.appspot.com/573160047/diff/581230043/scripts/build/output-distance.py#newcode759
scripts/build/output-distance.py:759: rel_top = os.path.relpath
(os.path.curdir, os.path.dirname (dest_file))
os.path.relpath is only available since Python 2.6. Given that you want
a relative path to the current directory, you can use something like the
following (works on my setup):
# Count the number of separators and construct a relative path to the
# current directory.
rel_top = '../' * os.path.dirname (dest_file).count (os.path.sep) + '..'

https://codereview.appspot.com/573160047/

Reply via email to