Martin Dobias
wonder.sk at gmail.com
Tue May 15 20:46:54 EDT 2007
Yay! Turning it off has made it! In docs, there's written that PythonOptimize set to On equals -O option. But in Python man page it says that docstrings are discarded only when two -O options are given... Is it possible to use optimalization with mod_python while leaving docstrings in place? Thanks a lot for your help. Martin On 5/16/07, Graham Dumpleton <graham.dumpleton at gmail.com> wrote: > Do you have the directive: > > PythonOptimize On > > set in your Apache configuration. If you do, then comment it out, > restart Apache and try again. > > Graham > > On 16/05/07, Martin Dobias <wonder.sk at gmail.com> wrote: > > Hi, > > > > I've been trying to get to run matplotlib with mod_python, but it > > fails when it gets imported. After some debugging I've found out that > > the problem is that parsing of docstrings in their classes fails. The > > reason is that the docstrings are empty instead of containing the > > actual text. > > > > Here's a simple script that demonstrates this behaviour - displays > > 'None' from MyClass.__doc__ > > > > ====== > > from mod_python import apache > > > > class MyClass: > > """some documentation""" > > pass > > > > def handler(req): > > req.write("Docstring content: %s \n" % MyClass.__doc__) > > return apache.OK > > ====== > > > > Is there any way how to enforce inclusion of docstrings? > > Or am I missing something essential? > > > > Regards, > > Martin Dobias > > _______________________________________________ > > Mod_python mailing list > > Mod_python at modpython.org > > http://mailman.modpython.org/mailman/listinfo/mod_python > > >
|