Browse Source

Fixed some import errors and name errors on Python 3

pull/8/head
Jason R. Coombs 14 years ago
parent
commit
a698c23cae
  1. 8
      svg/charts/plot.py
  2. 2
      svg/charts/time_series.py

8
svg/charts/plot.py

@ -1,15 +1,21 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys
from itertools import izip, count, chain from itertools import izip, count, chain
from lxml import etree from lxml import etree
from svg.charts.graph import Graph from svg.charts.graph import Graph
from util import float_range from .util import float_range
def get_pairs(i): def get_pairs(i):
i = iter(i) i = iter(i)
while True: yield i.next(), i.next() 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): class Plot(Graph):
"""=== For creating SVG plots of scalar data """=== For creating SVG plots of scalar data

2
svg/charts/time_series.py

@ -8,7 +8,7 @@ from dateutil.relativedelta import relativedelta
from time import mktime from time import mktime
import datetime import datetime
fromtimestamp = datetime.datetime.fromtimestamp fromtimestamp = datetime.datetime.fromtimestamp
from util import float_range from .util import float_range
class Plot(svg.charts.plot.Plot): class Plot(svg.charts.plot.Plot):
"""=== For creating SVG plots of scalar temporal data """=== For creating SVG plots of scalar temporal data

Loading…
Cancel
Save