Thank's Alan that was very inspiring for noob like me.. if we look at http://groups.google.com/group/web2py/browse_thread/thread/bea1afc64dcc39a6/280bbdcf5acd0bbd#280bbdcf5acd0bbd ,can we use similar methods to do real time streaming output ??
On Dec 30 2011, 6:29 pm, Alan Etkin <spame...@gmail.com> wrote: > I am not sure if web2py has a feature for that. You can still redirect > output to a filelike object during controller processing and on exit > return the control to the original handler. That way you could extract > the output from the file object to append it to the web2py response > > Pseudo-code: > > on controller start > > # create obj > # send all stdout to obj > # return dict with obj content as message or another name to be > processed by a web2py view > > On Dec 30, 12:21 am, blackshirt <fatkhulmusli...@gmail.com> wrote: > > > > > > > > > i have a little programming with web2py, with import some library from > > python-apt... > > i want to show output from some command/function from that library to > > the web page.. > > Output from that script showing on console, not showing on web page, > > but only result on return value (True / false) send to web page.. > > > Here some code from controller page > > > def update(): > > > apt_pkg.init() > > cache = apt.Cache() > > cache.update(apt.progress.TextFetchProgress()) > > cache.open(None) > > > this successfully run, if we call this controller, but output show on > > console not send to page.. > > How we solved this, i'm stuck here ? > > > Thanks for clue, advice, or reply's