Changeset 136

Show
Ignore:
Timestamp:
11/03/08 16:09:40 (3 years ago)
Author:
lgs
Message:

Makes pyflakes happier

Location:
trunk/examples
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/barchart.py

    r85 r136  
    6767 
    6868if __name__ == '__main__': 
    69     output = sys.argv[1] if len(sys.argv) > 1 else 'barchart.png' 
     69    if len(sys.argv) > 1: 
     70        output = sys.argv[1] 
     71    else: 
     72        output = 'barchart.png' 
    7073    barChart('v' + output, pycha.bar.VerticalBarChart) 
    7174    barChart('h' + output, pycha.bar.HorizontalBarChart) 
  • trunk/examples/linechart.py

    r85 r136  
    6161 
    6262if __name__ == '__main__': 
    63     output = sys.argv[1] if len(sys.argv) > 1 else 'linechart.png' 
     63    if len(sys.argv) > 1: 
     64        output = sys.argv[1] 
     65    else: 
     66        output = 'linechart.png' 
    6467    lineChart(output) 
  • trunk/examples/piechart.py

    r85 r136  
    5656 
    5757if __name__ == '__main__': 
    58     output = sys.argv[1] if len(sys.argv) > 1 else 'piechart.png' 
     58    if len(sys.argv) > 1: 
     59        output = sys.argv[1] 
     60    else: 
     61        output = 'piechart.png' 
    5962    pieChart(output) 
  • trunk/examples/scatterchart.py

    r112 r136  
    2222 
    2323import pycha.scatter 
    24  
    25 from lines import lines 
    2624 
    2725def scatterplotChart(output): 
     
    5452 
    5553if __name__ == '__main__': 
    56     output = sys.argv[1] if len(sys.argv) > 1 else 'scatterchart.png' 
     54    if len(sys.argv) > 1: 
     55        output = sys.argv[1] 
     56    else: 
     57        output = 'scatterchart.png' 
    5758    scatterplotChart(output) 
  • trunk/examples/test.py

    r85 r136  
    1818import cairo 
    1919 
    20 import pycha.pie 
    21 import pycha.bar 
    22 import pycha.line 
     20from pycha.pie import PieChart 
     21from pycha.bar import VerticalBarChart 
     22from pycha.line import LineChart 
    2323 
    2424def testPie(): 
    2525    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 400, 400) 
    2626 
    27     chart = pycha.pie.PieChart(surface) 
     27    chart = PieChart(surface) 
    2828    dataSet = ( 
    2929        ('myFirstDataset', [[0, 3]]), 
     
    4949        } 
    5050 
    51     chart = pycha.bar.VerticalBarChart(surface, options) 
     51    chart = VerticalBarChart(surface, options) 
    5252 
    5353    dataSet = ( 
     
    6666    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 600, 500) 
    6767 
    68     chart = pycha.line.LineChart(surface) 
     68    chart = LineChart(surface) 
    6969 
    7070    dataSet = (