File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ """
3+ pyflot.graph
4+
5+ This module implements the main classes.
6+
7+ :copyright: (c) 2011 by Brian Luft
8+ :license: MIT, see LICENSE for more details.
9+ """
10+
111import collections
212from datetime import date
313from functools import partial
414from itertools import chain
515import inspect
616import json
7- import os
817import time
918
1019
20+ __title__ = 'pyflot'
21+ __version__ = '0.2.2'
22+ __author__ = 'Brian Luft'
23+ __license__ = 'MIT'
24+ __copyright__ = 'Copyright 2011 Brian Luft'
25+
26+
1127def update (d , u ):
1228 """
1329 Recursively update nested dicts
@@ -155,20 +171,6 @@ def calculate_bar_width(self):
155171 w = xmax - xmin
156172 return float (w )/ slices
157173
158- def get_test_page (self ):
159- """Renders a test page"""
160- templatefile = open (os .path .join (
161- os .path .dirname (os .path .abspath (__file__ )),
162- 'templates' ,
163- 'test_page.html' ))
164- template = templatefile .read ()
165- template = template .replace ("{{ graph.series_json|safe }}" ,
166- self .series_json )
167- template = template .replace ("{{ graph.options_json|safe }}" ,
168- self .options_json )
169- out = open (os .path .join (os .getcwd (), 'testgraph.html' ), 'w' )
170- out .write (template )
171- out .close ()
172174
173175 def prepare_series (self , series ):
174176 if 'bars' in series :
You can’t perform that action at this time.
0 commit comments