Formatting of backend debugging output has changed

Issue #14 resolved
Botond Ballo repo owner created an issue

Prior to invoking the frontend, the backend prints some debugging information to help the user understand what went wrong if they see unexpected behaviour.

The formatting of that debugging information seems to have changed for some reason. It now looks like this:

('Chose function', u'mozilla::dom::SVGRectElement::GetGeometryBounds', 'in file', '/home/botond/dev/mozilla/central/dom/svg/SVGRectElement.cpp')
('Line range is [', 119, ',', 168, ']')
('Executed lines:', [120, 122, 123, 122, 125, 133, 143, 166, 167, 168])
('Adjusted executed lines:', [1, 3, 4, 3, 6, 14, 24, 47, 48, 49])
('Wrote data to file', '/tmp/tmppctGgA')
('Executing command:', 'cd /home/botond/dev/personal/cfviz/backend/.. && target/debug/cfviz-dmb --true-color /tmp/tmppctGgA')

The parentheses, single quotes, and top-level commas weren't there previously.

My guess is another Python 2 vs. Python 3 issue.

Comments (4)

  1. Botond Ballo reporter

    My guess is another Python 2 vs. Python 3 issue.

    Indeed. That is what the output of Python 3's print() function looks like in Python 2.

  2. Botond Ballo reporter

    Python 2 is interpreting print("a", "b") as "print the tuple ("a", "b")". Looks like it can be fixed with from __future__ import print_function, which imports Python 3's print() function into Python 2.

  3. Log in to comment