Perhaps something like this?

def index():
    return dict(button=TAG.button(_onclick="ajax('%s',[],'output')" %
URL('myprogram')),
                area=TEXTAREA(_id='output'))

def myprogram():
    return str(run_my_program())

It really depends on whether your program needs to be executed in
background in a different thread/process or not.


On Feb 13, 11:55 am, Jack315 <[email protected]> wrote:
> Hey guys, I'm new to this group, and a novice python programmer. In
> web2py, I want to know how to use python to make a simple, clickable
> button that when clicked runs a python program.
>
> Thanks,
>
> Jack

Reply via email to