OK, I'm including a psp file using the <%@include file="common.psp" %>
syntax, and this code is contained therein:

    def trivialFunction():
     res.write(dir(req.environ()))

    res.write(dir(req.environ()))
    trivialFunction()

If I comment out the call to the function it works fine. If I comment out
the straight res.write line and call the function it fails with:

NameError: There is no variable named 'res'

What's the difference? I thought I understood the scoping rules...

Regards,

David


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to