Graham Dumpleton
graham.dumpleton at gmail.com
Tue Aug 28 23:28:48 EDT 2007
If you are having to use 'main_interpreter', then it means some C extension module author has taken the easy path and used the simplified GIL state API for thread management rather than using the complete API properly. This means their module cannot be used in secondary sub interpreters as created in mod_python and you have to force it to use the main interpreter. Graham On 29/08/2007, Sidnei da Silva <sidnei at enfoldsystems.com> wrote: > "Richard Lewis" <richardlewis at fastmail.co.uk> wrote > in message news:200705231716.05231.richardlewis at fastmail.co.uk... > > Therefore I use lxml[2] which implements Fredrik Lundh[3]'s ElementTree[4] > > interface (which is now part of the Python standard library, as of 2.5[5]) > > as > > a wrapper around libxml/libxslt. Its a very nice way to work with XML/XSLT > > in > > Python as its /very/ fast and it creates nice Pythonic data structures as > > a > > result of your XSLT transformations which you can then go on to manipulate > > in > > code (or just write to a string or file-like object). The only problem > > I've > > had with it is, I /think/, that its causing crashing of the mod_python's > > Python interpreter when you use <xsl:import />. As I said, I /think/ this > > is > > what's causing these crashes, but I'm not sure yet. > > FWIW, I'm also using lxml and gone through a similar issue with a crash > using lxml and the XSLT document() function. The solution was to use > "PythonInterpreter main_interpreter", as I've found described on the > documentation for 'xapian' (!). Stephan Behnel, lxml developer also > suggested compiling lxml with(out?) threading support, but I didn't give > that a try. > > -- > Sidnei da Silva > Enfold Systems, Inc. > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|