
20 Jun
2006
20 Jun
'06
8:36 p.m.
Hi Petr,
Petr van Blokland wrote:
Using XPath Python functions, right now I instantiate a global object that functions can work on. That works fine, however for multi-threading applications in the future that won't work. What do you thinks is the best approach: locking the lxml process while running an XSLT transformation or searching/finding (or waiting for) a way to pass Python variables through to XPath functions?
I'm not quite sure what you're trying to do, but if it's about stateful functions, I'd implement them as callable objects. You can always use normal Python locking to serialise access to the object state.
Stefan