#!/usr/bin/python2 import sys if sys.platform == "darwin": # OSX: pyGlobus/globus need to be loaded before modules such as socket. import pyGlobus.ioc from optparse import Option from AccessGrid.Toolkit import CmdlineApplication from AccessGrid.VenueClient import VenueClientIW # Create application app = CmdlineApplication() # Create and add command-line option urlOption = Option('-u','--url',dest='url', default='https://localhost:11000/Venues/default') app.AddCmdLineOption(urlOption) # Initialize application app.Initialize('GetUsers') # Get url from command-line options url = app.GetOption('url') # Create venue interface wrapper venue = VenueClientIW(url) # Get clients from venue and process clientList = venue.GetUsers() for client in clientList: print client