[mod_python] PSP and object duplication

Fred of UrlBit.Us fred at urlbit.us
Fri Mar 9 15:43:12 EST 2007

I am having a problem with PSP that seems to be copying objects in the vars 
list rather than using the originals.

Basically, I invoke PSP directly in mod_python (rather than using the Apache 
directives to do it.) Something like:

psp=PSP(req, vars={"myob":myob})

And from within the template, I modify myob.

But when psp.run() returns, the modifications to myob are gone. It as though 
PSP actually made a copy of myob, rather than using the actual object 

I actually looked at the PSP code, and it appeared NOT to be doing a copy -- 
at least during construction. I did not delve deeper into the code yet.

I hope someone can explain this strange behavior!!!! Any ideas would be 
greatly appreciated. Thanks!

-- Fred
Bite those long URLs!

More information about the Mod_python mailing list