i have a little problem with web2py. i'm doing simple writing application with web2py. the code look like this
for controller : import apt_pkg def important(): apt_pkg.init() cache = apt_pkg.Cache() for pkg in cache.packages: if pkg.essential: return dict(t=pkg) and for related view : {{extend 'layout.html'}} <ul> <li>{{=t.name}}</li>{{pass}} </ul> if we run this script on python shell, the output should like this base-files sysvinit-utils util-linux diffutils perl-base bash login e2fsprogs dash coreutils bsdutils base-passwd dpkg findutils debianutils sed tar ncurses-base grep mount gzip ncurses-bin hostname sysvinit but when we run through web2py, the output just first entry from list of essential packages above. it looks like this . base-files what wrong with my code.. i'm still pretty newbie on python and web2py framework