[BangPypers] Live update of cmdline output on browser?

Elvis Joel D'Souza me at elvis.co.in
Tue Jun 15 03:38:21 CEST 2010


On Mon, Jun 14, 2010 at 8:53 PM, Noufal Ibrahim <noufal at gmail.com> wrote:

> On Mon, Jun 14, 2010 at 8:06 PM, Vikas BN <vikas.bn at gmail.com> wrote:
> [..]
> >  Is there a way to 'tail' the output of this script to the browser? I
> > searched on the
> >  internet, but apparently my skills in that area seem to have fallen
> short
> > in this case :(
>
> Not Python specific but Ajax term
> (http://antony.lesuisse.org/software/ajaxterm/) and it's predecessor
> anyterm implement web based terminals. You might be able to steal some
> ideas from there. As far as I know, they implement a simple polling
> mechanism with something like exponential back off to read back new
> data on the remote process.
>


Comet Programming <http://en.wikipedia.org/wiki/Comet_%28programming%29> is
a solution for Server PUSH (wherein client tells the server,
"Send me data as and when you have to")

Unfortunately, you'll need a separate server for handling such requests...

Here are some pointers:

You can use Orbited (written in Python). Check out http://orbited.org/
This page <http://orbited.org/wiki/Tutorials> has links to tutorials in case
you want to use it with django/rails...

As an alternative for Orbited, you can use StreamHub<http://www.stream-hub.com/>

p.s. Since your requirement includes predictable requests (20 minute delay),
you can just
have a simple polling mechanism or -- even better -- use what Noufal
suggested


>
>
> --
> ~noufal
> http://nibrahim.net.in
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Elvis Joel D'Souza
Mangalore/Bangalore, India


More information about the BangPypers mailing list