Example #1
0
def getrole():

    choices = (
        (1, "member"),
        (2, "moderator"),
        (3, "admin"),
    )

    role = prompt_choices("role", choices=choices, resolve=int, default=1)
    print "ROLE:", role
Example #2
0
def getrolesimple():

    choices = ("member", "moderator", "admin")

    role = prompt_choices("role", choices=choices, default="member")
    print "ROLE:", role