[Tutor] PyDoc problem
Christian Meesters
meesters at uni-mainz.de
Fri Sep 23 15:41:58 CEST 2005
Hi Paul,
works great and within a seond, if I just uncomment the scipy imports.
This was easy, but without your help I still would stare at my screen
and think it's hopeless.
Thanks,
Christian
On 23 Sep 2005, at 13:18, paul brian wrote:
> THis sounds like a recursive import, which frankly should not happen
> but perhaps pydoc imports differently to the standard. Or it is trying
> to document the entire scipy framework, rather than just your module
>
> try firstly moving the module alone to directory foo and ensuring you
> are calling only that module
>
>> pydoc -w mymodule
>
> Perhaps also try uncommenting imports at the top of the file (ie #
> import scipy) to see if that helps.
>
>
>
> On 9/23/05, Christian Meesters <meesters at uni-mainz.de> wrote:
>> Hi,
>>
>> PyDoc is working well, if invoked without flags on the modul in
>> question. But when I use it with '-w' to produce html-output, I get an
>> extremely long Traceback after a runtime of an hour or two. Here is a
>> short part from it:
>>
>> Traceback (most recent call last):
>> File "/usr/bin/pydoc", line 4, in ?
>> pydoc.cli()
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/pydoc.py", line 2117, in cli
>> writedoc(arg)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/pydoc.py", line 1383, in writedoc
>> page = html.page(describe(object), html.document(object, name))
>> File
>> "/Users/maxwell/Packages/SciPy_complete-0.3.2/build/lib.darwin-7.7.0-
>> Power_Macintosh-2.3/scipy_base/ppimport.py", line 397, in
>> _scipy_pydoc_Doc_document
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/pydoc.py", line 283, in document
>> if inspect.ismodule(object): return self.docmodule(*args)
>> <snip>
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/repr.py", line 49, in repr_list
>> s = s + self.repr1(x[i], level-1)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/pydoc.py", line 319, in repr1
>> return self.escape(cram(stripid(repr(x)), self.maxother))
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/pydoc.py", line 111, in stripid
>> if re.search(pattern, repr(Exception)):
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>> python2.3/sre.py", line 137, in search
>> return _compile(pattern, flags).search(string)
>> RuntimeError: maximum recursion depth exceeded
>>
>> What's going wrong? When I ask Pydoc to write html documentation for
>> other modules there is no problem at all. It just works fine. And this
>> traceback tell me nothing about my module, only about PyDoc. For it
>> matters: I'm stuck with Python2.3 for compatibility reasons in this
>> project and the module I'd like to see documented uses scipy and it is
>> not really a small module anymore (about 1000 lines, including
>> docstrings and comments).
>> Anybody an idea how I can force PyDoc to produce html output on this
>> module?
>>
>> TIA
>> Christian
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
> --
> --------------------------
> Paul Brian
> m. 07875 074 534
> t. 0208 352 1741
>
More information about the Tutor
mailing list