[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[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()