Beispiel #1
0
def updateTeam():
    viewTeam()
    teamN = input('Enter the name of the Team: ')
    _tName = input('Enter the name of the new Team: ')
    _tPG = input('Point Guard: ')
    _tSG = input('Shooting Guard: ')
    _tSF = input('Small Forward: ')
    _tPF = input('Power Forward: ')
    _tC = input('Center: ')
    _tOwner = input('Team Owner: ')
    _tCoach = input('Team Coach: ')

    x = tm.update({
        tm.tName: _tName,
        tm.tPG: _tPG,
        tm.tSG: _tSG,
        tm.tSF: _tSF,
        tm.tPF: _tPF,
        tm.tC: _tC,
        tm.tOwner: _tOwner,
        tm.tCoach: _tCoach
    }).where(tm.tName == teamN)
    cnfrm = input(
        'Are you sure you want to replace the {} with the {}? [Y]: '.format(
            teamN, _tName))
    if (cnfrm == 'y') or (cnfrm == 'Y'):
        y = x.execute()
        os.system('cls')
        puts(colored.cyan('\n{} team has been updated!\n'.format(y)))
        viewTeam()