(My) gendoc can't handle the package import structure of python 1.5. (doc_collect.py issues an error at line 533). As Mark Hammond wrote to this list on Thu, 19 Feb 1998:
... Currently gendoc has been patched to work in 1.5 by it's author Daniel Larsson.
I presume that a newer/patched version must be around somewhere. I can't download this, however (I can't access Daniel Larsson's starship/crew account). Can anyone point the to this? Thanks, Henk. -- ----------------------------------------------------------------------- | Henk Jansen hjansen@math.tudelft.nl | | Delft University of Technology P.O.Box 5031 (Mekelweg 4) | | > Information Technoloy and Systems (ITS) 2600 GA Delft | | >> Mathematics (TWI) The Netherlands | | >>> Applied Analysis (TA) phone: +31(0)15.278.7295 | | >>>> Large Scale Models (WAGM) fax: +31(0)15.278.7209 | -----------------------------------------------------------------------
Hi Henk (and other interested...) Yes, there is a newer version on my Starship account. Now it even has a link on my pages... ;-)... Why can't you access it? Do you want me to email it to you? (Check http://starship.skyport.net/crew/danilo/) Henk Jansen wrote:
(My) gendoc can't handle the package import structure of python 1.5. (doc_collect.py issues an error at line 533). As Mark Hammond wrote to this list on Thu, 19 Feb 1998:
... Currently gendoc has been patched to work in 1.5 by it's author Daniel Larsson.
I presume that a newer/patched version must be around somewhere. I can't download this, however (I can't access Daniel Larsson's starship/crew account). Can anyone point the to this?
Thanks,
Evening all, Currently doc_collect does nasty things with at least one (perfectly valid) module I've written. The following seems to fix it, would appreciate input as to whether it would break anything: 8<___ doc_collect.py line 132+ ______ def whichmoduleobj(cls): """Figure out the module in which a class occurs. Search sys.modules for the module. Cache in classmap. Return a module object. If the class cannot be found, raise exception. """ ### Altered by mcfletch 98.03.31 to use 1.5 stuff if hasattr( cls, '__module__' ): try: import sys return sys.modules[ cls.__module__ ] # is this always imported??? except: pass ### End mcfletch alterations if _classmap.has_key(cls): return _classmap[cls] ... ________________________________ M i k e C . F l e t c h e r mcfletch@golden.net http://www.golden.net/~mcfletch/ ________________________________ Design, Consultation, Training Now available for hire
Hi Daniel, Rewriting the hyperlink_regex in ManualPage so that it does a simple, deterministic search should fix the error around line 505 which you are currently working around (and for which the workaround can cause index errors)... You will, also need to reduce each index Caveat: I haven't got anything with links with which to test this, just a lot of files that are failing due to the indexerrors. Cheers, Mike 8<____ ManualPage.py line 109 _____ hyperlink_regex = regex.compile('HREF=\\([^:]*\\)\\(::\\)\\([^:]*\\)\\(/HREF\\)') 8<____ ManualPage.py line 500 _____ while 1: index = hyperlink_regex.search(text, index+len(rendered_link)) if index == -1: break link_len = len(hyperlink_regex.group(0)) # Group 1 is the link, group 3 the link text link, link_text = hyperlink_regex.group(1), hyperlink_regex.group(3) ________________________________ M i k e C . F l e t c h e r mcfletch@golden.net http://www.golden.net/~mcfletch/ ________________________________ Design, Consultation, Training Now available for hire
Ah, looking at the results, I see I do have plenty with which to test (they apparently mean something different than I'd assumed)... here's the re-revised version that works properly as far as I can see :) . Sorry for the static :-/ , Mike 8<____ ManualPage.py line 108 _____ # ___1____ ___2______ hyperlink_regex = regex.compile('HREF=\\([^:]*\\)::\\([^:]*\\)/HREF') 8<____ ManualPage.py line 500 _____ while 1: index = hyperlink_regex.search(text, index+len(rendered_link)) if index == -1: break link_len = len(hyperlink_regex.group(0)) # Group 1 is the link, group 3 the link text link, link_text = hyperlink_regex.group(1), hyperlink_regex.group(2) ________________________________ M i k e C . F l e t c h e r mcfletch@golden.net http://www.golden.net/~mcfletch/ ________________________________ Design, Consultation, Training Now available for hire
Ok, I've included the bugfixes from Mike Fletcher. (And made a programming interface too, Mike). This time gendoc is released as a .zip file, since I'm sitting with a win95 machine at home... Look at http://starship.skyport.net/crew/danilo/download/gendoc-0.71.zip Cheers, Daniel
participants (3)
-
Daniel Larsson -
Henk Jansen -
Mike Fletcher