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.row...@manchester.ac.uk 

-----Original Message-----
From: owner-ag-t...@mcs.anl.gov [mailto:owner-ag-t...@mcs.anl.gov] On Behalf
Of Ivan R. Judson
Sent: 06 October 2004 04:51
To: ag-t...@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/tools/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()



Reply via email to