>
> def index():
>     open('/tmp/xxx', 'w').write("PYTHONPATH=%s" % 
> (os.environ['PYTHONPATH']))
>     redirect(URL('static','output/Portal.html'))
>
> (I have done this because I do not know how to use simple "print" 
> statements in web2py. I guess the rendering engine gives a special meaning 
> to stdout)
>

print statements should output to the shell where you started web2py (or 
that was opened when starting via the GUI).
 

> I get a ticket, stating that there are import problems.
>

Can you show the traceback? Have you confirmed that the imports work from a 
standard Python shell? Do you have empty __init__.py files in the folders 
where the modules reside?
 

> I have taken a detailed look at the context/request and indeed the 
> PYTHONPATH is not available, neither on "env" nor on wsgi/environment.
>

No, the PYTHONPATH would not be part of the request object, but that 
doesn't matter -- that's not how it works.

Anthony

-- 



Reply via email to