def list_platforms():
    """
    Simple script to extract the list of requested platforms from the slot
    configuration file.
    """
    __author__ = 'Marco Clemencic <marco.clemencic@cern.ch>'
    import os
    import sys
    from LbNightlyTools.Configuration import findSlot
    usage = 'Usage: %s configuration_file' % os.path.basename(sys.argv[0])
    if '-h' in sys.argv or '--help' in sys.argv:
        print(usage)
        sys.exit(0)
    if len(sys.argv) != 2:
        print(usage, file=sys.stderr)
        sys.exit(1)
    print(' '.join(findSlot(sys.argv[1]).platforms))
