diff --git a/svg/charts/plot.py b/svg/charts/plot.py index 19affc8..07cc80e 100644 --- a/svg/charts/plot.py +++ b/svg/charts/plot.py @@ -1,15 +1,21 @@ #!/usr/bin/env python +import sys from itertools import izip, count, chain from lxml import etree from svg.charts.graph import Graph -from util import float_range +from .util import float_range def get_pairs(i): i = iter(i) while True: yield i.next(), i.next() - + +# I'm not sure how this is more beautiful than ugly. +if sys.version >= '3': + def apply(func): + return func() + class Plot(Graph): """=== For creating SVG plots of scalar data diff --git a/svg/charts/time_series.py b/svg/charts/time_series.py index b8513fa..0afeeac 100644 --- a/svg/charts/time_series.py +++ b/svg/charts/time_series.py @@ -8,7 +8,7 @@ from dateutil.relativedelta import relativedelta from time import mktime import datetime fromtimestamp = datetime.datetime.fromtimestamp -from util import float_range +from .util import float_range class Plot(svg.charts.plot.Plot): """=== For creating SVG plots of scalar temporal data