Hmm. I've found that I seem to have this scoping problem whether the code is
included or not. The code as it appears in the cached psp.py file looks like
this (edited for size)
def writeHTML(self, transaction=None):
trans = self._transaction
res= trans.response()
req = trans.request()
res.write("""
""")
def trivialFunction():
res.write(dir(req.environ()))
#res.write(dir(req.environ()))
trivialFunction()
...and so on
As before, the res.write that I call directly works fine, but calling from
the function I get a NameError with respect to res.
What am I missing? Is this just because writeHTML itself is a mere method
and so I cannot treat its local variables as globals for the enclosed
functions?
David O'Callaghan
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss