[AG-TECH] stream information from the venue

Andrew Rowley Andrew.Rowley at manchester.ac.uk
Wed Oct 6 06:58:39 CDT 2004

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,
M13 9PL, 
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

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.")
args = app.Initialize()

venueUrl = app.GetOption("url")
if venueUrl is None:
    print "Exiting, no url specified."

venueClient = VenueIW(venueUrl)

streams = venueClient.GetStreams()

for s in streams:
    print "Stream: ", s.AsINIBlock()

More information about the ag-tech mailing list