Created
August 6, 2013 09:46
-
-
Save yipyip/6163205 to your computer and use it in GitHub Desktop.
nicht root menu, sondern nur submenu aendern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rename_team(team_number): | |
"""rename teamnames in the teamnamces dict and in the menu dict""" | |
# hier kommt nicht der neue name | |
new_name = input("please enter new name for team number {}: ".format( | |
team_number)) | |
if new_name == "": | |
print("nothing renamed") | |
return | |
team_names[team_number] = new_name | |
# outcommented code does not works, renames root entry :-( | |
# access the value of key "root" , entry [team_number], first entry | |
#menu["root"][team_number][0] = "Manage team {}".format(new_name) | |
# submenus | |
# hier wird das submenu geaendert | |
key = "team{0}".format(team_number) | |
menu[key][0][0] = "show info of team {}".format(new_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment