On 3 December 2011 11:33, Paul Moore <p.f.mo...@gmail.com> wrote: > The one thing I *would* like to know, though, is whether there is a > way for a formatter to obtain a unique identifier for the region it's > responsible for (page ID plus occurrence ID, something like that). > Having that would mean I could write fairly naive code without falling > into the trap of having something that fails when there are 2 > occurrences on the same page.
I worked this out - the following code in my parser's __init__ does the job: self.count = getattr(request, 'Parser_counter_Count', 0) request.Parser_counter_Count = self.count + 1 What was going wrong in my earlier tests was that I was using a name starting with __ and Python mangles the name in that case (in the second line, but not in the first). Paul ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user