There are two ways around it:
- hopefully the apt module can be configured to send output to a file
- if not, use the python subprocess module to run the code is a
separate process. The popen function has the ability to capture the
output.

On Dec 29, 9:21 pm, 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

Reply via email to