def print_user_list_app(app):
    print 'Users'
    if has_str_format:
        print "   {0:15} {1:35} {2:10} {3:10}".format('Name', 'Email', 'Role', 'Deployment')
        for user in app['users']:
            print "   {0:15} {1:35} {2:10} {3:10}".format(
                user['username'],
                user['email'],
                user['role'] if 'role' in user else '',
                user['deployment'] if 'deployment' in user else '(app)'
            )
    else:
        print "   %-15ls %-35ls %-10ls %-10ls" % ('Name', 'Email', 'Role', 'Deployment')
        for user in app['users']:
            if 'deployment' not in user:
                user['deployment'] = '(app)'
            if 'role' not in user:
                user['role'] = ''

            print "   %(username)-15ls %(email)-35ls %(role)-10ls %(deployment)-10ls" % (user)
dataset/ETHPy150Open cloudControl/cctrl/cctrl/output.py/print_user_list_app/original