Exemplo n.º 1
0
def sep():
    print "#"*80

if __name__ == "__main__":
    setup_environ(settings)
    import import_judges
    import import_teams
    import import_scratches
    print "Importing Judges"
    sep()
    try:
        import_judges.import_judges("../JudgeEntry.xls")
    except:
        print "There was an error importing judges"
    sep()
    try:
        import_teams.import_teams("../TeamEntry.xls")
    except:
        print "There was an error importing teams"
    sep()
    try:
        import_scratches.import_scratches("../ScratchEntry.xls")
    except:
        print "There was an error importing scratches"
    sep() 
   
   
   
   
Exemplo n.º 2
0
from process_options import process_options, create_play_dates
from import_teams import import_teams
from print_schedule import print_schedule, print_league, print_team_schedule

# Process command line options
ARGS = process_options()
#NTEAMS = NDTEAMS * NDIV
#NLOC = NDTEAMS

# Define League Shell
IHPL = League('IHPL 2018')
for divn in range(ARGS.NDIVS):
    IHPL.add_div('Division #' + str(divn + 1))

# Read in League Info
[ihpl_teams, ihpl_capts] = import_teams(IHPL, ARGS.NDTEAMS, ARGS.teamfile)

# Define play dates
[PLAY_DATES_H1, PLAY_DATES_H2, PLAY_DATES_XD] \
        = create_play_dates(ARGS.START_DATE, ARGS.NDTEAMS, ARGS.SKIP_DATES)
"""Create intradivisional schedules"""
print("Division 1 First Half")
D1H1 = Schedule('Division 1 First Half')
round_robin(D1H1, IHPL.divs[0], PLAY_DATES_H1, 0)

print("Division 1 Second Half")
D1H2 = Schedule('Division 1 Second Half')
round_robin(D1H2, IHPL.divs[0], PLAY_DATES_H2, 1)

print("Division 2 First Half")
D2H1 = Schedule('Division 2 First Half')
Exemplo n.º 3
0
def create(season, currentSeason=parameters.TRUE):
    import_teams()
    db = NBADB()
    load_all_players(season, db, currentSeason)