#!/usr/bin/env python import json import sys from lotto_analysis import models from lotto_analysis import factories game_type = 'Powerball' lotto_fact = factories.lotto_factory(game_type) power_ar = lotto_fact.retrieve_powerball() list_format = "{!s:15}{!s:10}{!s:10}{!s:10}" print list_format.format('Date', 'Game', 'Numbers', 'Powerball') counter = 0 for power in power_ar: if counter % 25 == 0: print list_format.format('Date', 'Game', 'Numbers', 'Powerball') print '-' * 45 print list_format.format(power.get_draw_date(), power.get_game(), " ".join(power.get_numbers()), " ".join(power.get_powerball())) counter += 1
""" this is test pydoc """ import json import sys sys.path[0:0] = [""] from lotto_analysis import models from lotto_analysis import factories print "-" * 5 print "Test Factories" print "-" * 5 lotto_fact = factories.lotto_factory('Lotto') #lot_json = lotto_fact.retrieve_lotto('Lotto'); lot_ar = lotto_fact.retrieve_lotto() list_format = "{!s:15}{!s:10}{!s:10}" print list_format.format('Date', 'Game', 'Numbers') counter = 0 for lot in lot_ar: if counter % 25 == 0: print list_format.format('Date', 'Game', 'Numbers') print '-' * 35 print list_format.format(lot.get_draw_date(), lot.get_game(), " ".join(lot.get_numbers())) counter += 1
#!/usr/bin/env python import json import sys from lotto_analysis import models from lotto_analysis import factories game_type = "Powerball" lotto_fact = factories.lotto_factory(game_type) power_ar = lotto_fact.retrieve_powerball() list_format = "{!s:15}{!s:10}{!s:10}{!s:10}" print list_format.format("Date", "Game", "Numbers", "Powerball") counter = 0 for power in power_ar: if counter % 25 == 0: print list_format.format("Date", "Game", "Numbers", "Powerball") print "-" * 45 print list_format.format( power.get_draw_date(), power.get_game(), " ".join(power.get_numbers()), " ".join(power.get_powerball()) ) counter += 1
""" this is test pydoc """ import json import sys sys.path[0:0] = [""] from lotto_analysis import models from lotto_analysis import factories print "-"*5 print "Test Factories" print "-"*5 lotto_fact = factories.lotto_factory('Lotto'); #lot_json = lotto_fact.retrieve_lotto('Lotto'); lot_ar = lotto_fact.retrieve_lotto(); list_format = "{!s:15}{!s:10}{!s:10}" print list_format.format('Date','Game','Numbers') counter = 0 for lot in lot_ar: if counter % 25 == 0: print list_format.format('Date','Game','Numbers') print '-'*35 print list_format.format(lot.get_draw_date(),lot.get_game()," ".join(lot.get_numbers())) counter +=1