[Fwd: Re: [mod_python] psp.PSP(req, string='hello world') causessegfault]

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue Apr 26 23:04:09 EDT 2005

On Tue, 26 Apr 2005, Graham Dumpleton wrote:

> The code in PSP constructor where code is first put in cache should be:
>            cached = mem_scache.get(string)
>            if cached:
>                self.code = cached
>            else:
>                source = _psp.parsestring(string)
>                code = compile(source, "__psp__", "exec")
>                mem_scache.store(string,code)
>                self.code = code
> Ie., code wasn't actually being compiled. Not sure what should be put
> for second argument. It only gets displayed in error messages according
> to documentation. Normally it would be the name of the module, but
> there isn't one here.

Something like "psp_parsestring" or even "psp parsestring" (dunno if 
spaces are allowed) is probably going to be more descriptive.

Just my $0.02


More information about the Mod_python mailing list