[AG-TECH] stream information from the venue

Ivan R. Judson judson at mcs.anl.gov
Wed Oct 6 08:14:08 CDT 2004


The really big ugly GetVenues call will return a list of venue descriptions.
You could then iterate through the list matching on the name, and getting
the url.

This should be cleaner in the future (less heavyweight).

--Ivan 

> -----Original Message-----
> From: Andrew Rowley [mailto:Andrew.Rowley at manchester.ac.uk] 
> Sent: Wednesday, October 06, 2004 6:59 AM
> To: judson at mcs.anl.gov; ag-tech at mcs.anl.gov
> Subject: RE: [AG-TECH] stream information from the venue
> 
> Is there any way to find the URL of the venue given it's name?
> 
> Andrew :)
> 
> ============================================
> Access Grid Support Centre,
> SVE Group,
> Manchester Computing,
> Kilburn Building,
> University of Manchester,
> Oxford Road,
> Manchester,
> M13 9PL,
> UK
> Tel: +44(0)161-275 0615
> Email: Andrew.Rowley at manchester.ac.uk 
> 
> -----Original Message-----
> From: owner-ag-tech at mcs.anl.gov 
> [mailto:owner-ag-tech at mcs.anl.gov] On Behalf Of Ivan R. Judson
> Sent: 06 October 2004 04:51
> To: ag-tech at mcs.anl.gov
> Subject: [AG-TECH] stream information from the venue
> 
> 
> For all of you who have wondered how they were going to deal 
> with dynamic addressing, or how to find out what the stream 
> information is for a given venue, here is an example that 
> should show you how _simple_ it is to get the information 
> from the venue.
> 
> This code is available from
> (http://fl-cvs.mcs.anl.gov/viewcvs/viewcvs.cgi/AccessGrid/tool
s/VenueStreams
> .py):
> 
> 
> #!/usr/bin/python2
> #
> import os, sys
> from optparse import Option
> 
> from AccessGrid.Venue import VenueIW
> from AccessGrid.Toolkit import CmdlineApplication
> 
> # Initialize
> app = CmdlineApplication()
> urlOption = Option("-u", "--url", dest="url", default=None,
>                    help="Specify a venue url on the command line.")
> app.AddCmdLineOption(urlOption)
> args = app.Initialize()
> 
> venueUrl = app.GetOption("url")
> if venueUrl is None:
>     print "Exiting, no url specified."
>     sys.exit(0)
> 
> venueClient = VenueIW(venueUrl)
> 
> streams = venueClient.GetStreams()
> 
> for s in streams:
>     print "Stream: ", s.AsINIBlock()
> 
> 
> 
> 




More information about the ag-tech mailing list