i have some a littel coding with web2py framework..
here is my controller and file :

def update():
   cache = apt.Cache()
   progress = apt.progress.TextFetchProgress()
   res = cache.update(progress)
   return dict(res = res)


in this related view..

{{extend 'layout.html'}}
{{=res}}
{{pass}}

the controller works normally, ie. update the APT database.. i see it
progress on console output.
but on view just return value

True

after process update finish...


i hope, the output progress, like this normally :

Hit http://ftp.hk.debian.org stable Release.gpg
Hit http://security.debian.org stable/updates Release.gpg
Ignored http://security.debian.org/ stable/updates/contrib Translation-
en
Failed http://security.debian.org/ stable/updates/contrib Translation-
en
Ignored http://security.debian.org/ stable/updates/main Translation-en
Failed http://security.debian.org/ stable/updates/main Translation-en
Ignored http://security.debian.org/ stable/updates/non-free
Translation-en
Failed http://security.debian.org/ stable/updates/non-free Translation-
en
Hit http://security.debian.org stable/updates Release
Done http://security.debian.org stable/updates Release
Ignored http://ftp.hk.debian.org/debian/ stable/contrib Translation-en
Failed http://ftp.hk.debian.org/debian/ stable/contrib Translation-en
Hit http://security.debian.org stable/updates/main amd64 Packages
Ignored http://ftp.hk.debian.org/debian/ stable/main Translation-en
Failed http://ftp.hk.debian.org/debian/ stable/main Translation-en
Hit http://security.debian.org stable/updates/contrib amd64 Packages
Hit http://security.debian.org stable/updates/non-free amd64 Packages
Ignored http://ftp.hk.debian.org/debian/ stable/non-free Translation-
en
Failed http://ftp.hk.debian.org/debian/ stable/non-free Translation-en
Hit http://ftp.hk.debian.org stable Release
Done http://ftp.hk.debian.org stable Release
Hit http://ftp.hk.debian.org stable/main Sources
Hit http://ftp.hk.debian.org stable/contrib Sources
Hit http://ftp.hk.debian.org stable/non-free Sources
Hit http://ftp.hk.debian.org stable/main amd64 Packages
Hit http://ftp.hk.debian.org stable/contrib amd64 Packages
Hit http://ftp.hk.debian.org stable/non-free amd64 Packages
Done downloading


showing on the view output..
How we can do this on web2py ?
i'm still pretty newbie on python and web2py

thanks

Reply via email to