def userlist(): """ List all users""" try: for user in User.select(): print user.login except Exception, e: print "Unexpected error: %s" % e