From e2860c99f6424f98468c3efe5fadf87c20e9dad4 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 25 Feb 2013 18:52:10 +0000 Subject: [PATCH] Python3 changes: __next__ and future division (which is not done yet) svn: r21445 --- gramps/plugins/drawreport/descendtree.py | 8 ++++---- gramps/plugins/lib/libtreebase.py | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gramps/plugins/drawreport/descendtree.py b/gramps/plugins/drawreport/descendtree.py index 53ad67649..c75c2fc99 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -80,7 +80,7 @@ class DescendantBoxBase(BoxBase): def __init__(self, boxstr): BoxBase.__init__(self) self.boxstr = boxstr - self.next = None + self.__next__ = None self.father = None def calc_text(self, database, person, family): @@ -124,7 +124,7 @@ class PlaceHolderBox(BoxBase): self.boxstr = "None" self.level = level self.line_to = None - self.next = None + self.__next__ = None def calc_text(self, database, person, family): """ move along. Nothing to see here """ @@ -390,7 +390,7 @@ class RecurseDown: def add_to_col(self, box): """ Add the box to a column on the canvas. we will do these things: - set the .next attrib for the boxs in this col + set the .__next__ attrib for the boxs in this col get the height and width of this box and set it no the column also we set the .x_cm to any s_level (indentation) here we will calculate the real .x_cm later (with indentation) @@ -404,7 +404,7 @@ class RecurseDown: if self.cols[level]: #if (not the first box in this column) last_box = self.cols[level] - last_box.next = box + last_box.__next__ = box #calculate the .y_cm for this box. box.y_cm = last_box.y_cm diff --git a/gramps/plugins/lib/libtreebase.py b/gramps/plugins/lib/libtreebase.py index f5dbf3601..f1651c07a 100644 --- a/gramps/plugins/lib/libtreebase.py +++ b/gramps/plugins/lib/libtreebase.py @@ -24,7 +24,14 @@ #------------------------------------------------------------------------ # -# python modules +# Python modules +# +#------------------------------------------------------------------------ +from __future__ import division + +#------------------------------------------------------------------------ +# +# gramps modules # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale