def print_list_apps(apps):
    """
        Print a nice table of apps.
    """
    print 'Apps'
    if has_str_format:
        print " {0:3} {1:30} {2:6}".format('Nr', 'Name', 'Type')
        for i, app in enumerate(apps):
            print " {0:3} {1:30} {2:6}".format(
                i + 1,
                app['name'],
                app['type']['name'])
    else:
        print " %-3ls %-30ls %-6ls" % ('Nr', 'Name', 'Type')
        for i, app in enumerate(apps):
            print " %-3ls %-30ls %-6ls" % (
                i + 1,
                app['name'],
                app['type']['name'])
dataset/ETHPy150Open cloudControl/cctrl/cctrl/output.py/print_list_apps/original