Hi,

I am working on an application that attempts to stream annotated media -
  using annodex (see http://www.annodex.net).  I have modelled much of
my application on a python app called cmmlwiki which does much the same
thing.  In cmmlwiki, the streaming of media process involves blatting
data back to the client a bit like this:

while 1:
         x = anx.write(1024000)
         if (x <= 0):
             break

     sys.stdout.flush()

So "anx" is an annodex object and it is writing a stream of media data
back.  Is this sort of thing possible in Pylons?  Obviously not a file
stream in the same way - I have checked out
http://docs.pythonweb.org/display/pylonsfaq/Streaming+Content+to+the+Browser
and have tried code like this:

def playit():  # this is inside a controller...
    # various initialising
    def blat(anx):
            while 1:
                x = anx.write(1024000)
                yield x
                if (x <= 0):
                    break

     return blat(anx)

Again this blats all right, but only to standard output - how do I get
such data to the client?

Apologies if my terminology is a bit wayward - I'm probably a bit out of
my depth...

Cheers,

Denis Crowdy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to