/+junk/pygooglechart-py3k

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/pygooglechart-py3k

« back to all changes in this revision

Viewing changes to examples/helper.py

  • Committer: Gustav Hartvigsson
  • Date: 2011-01-03 20:24:45 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20110103202445-qh7ogio9ined8ufv
Made it compatible with Python 3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import random
20
20
 
21
21
def random_data(points=50, maximum=100):
22
 
    return [random.random() * maximum for a in xrange(points)]
 
22
    return [random.random() * maximum for a in range(points)]
23
23
 
24
24
def random_colour(min=20, max=200):
25
25
    func = lambda: int(random.random() * (max-min) + min)