If anyone else may need it, the code is this and it works fine.
The only difference is that the script had to do an explicit commit.

def procesar():
    import subprocess
    import os
    script = os.path.join(request.folder, 'private', 'script.py')
    comando = "python %s/web2py.py -S py_ccu -M -R %s"%(os.getcwd(),
script)
    subprocess.Popen(comando, shell=True)
    redirect(URL(r=request, f='a_function'))

As always, excellent web2py
Jose

Reply via email to