#8 Epydoc should have a more explicit Jython support statement

Inspection (9)
Curt Cox


I'm trying to use Epydoc to generate documentation from
Jython source.

I'm a Jython newbie, so I suspect that I am just doing
things wrong and Epydoc. However, I was unable to find
any documentation saying this was (im)possible. If it
is possible, an example in the documentation would be
welcome. Otherwise, documenting the limitation would
be nice.

For the curious, here are my errors:

When trying from the command line:
Error: no modules successfully loaded!

When trying from the gui:
Error impoting 'Foo': No module named java.lang



  • Edward Loper

    Edward Loper - 2003-10-21

    Logged In: YES

    Unfortunately, I don't have much experience with jython,
    so I can't say much about whether it would work or not, or
    what would be required to make it work.

    That said, it seems that at the very least, you would need
    to run epydoc from jython, instead of from python, if you
    want to document jython code. Epydoc uses inspection to
    figure out the contents of modules, and that won't be
    possible for jython modules if it's run from python. Just
    double clicking on the gui will run epydoc with python.

    So try running epydoc (either the gui or the command-line
    interface) from jython, and see if it works. If not, let me
    know what the error message is.

    And if it does work, I'd appreciate a note about how you
    invoked it, and anything special you needed to do, so I can
    add the requested documentation to the epydoc

  • Edward Loper

    Edward Loper - 2003-10-21
    • labels: --> Inspection
    • assigned_to: nobody --> edloper
  • Jeremy Field

    Jeremy Field - 2004-11-19

    Logged In: YES

    Ed: Epydoc doesn't run happily under Jython -- the first error to come up is:

    Traceback (innermost last):
    File "/usr/lib/site-python/epydoc/cli.py", line 747, in ?
    File "/usr/lib/site-python/epydoc/cli.py", line 95, in cli
    File "/usr/lib/site-python/epydoc/cli.py", line 443, in _import
    File "/usr/lib/site-python/epydoc/imports.py", line 119, in import_module
    File "/usr/lib/site-python/epydoc/imports.py", line 152, in _import_module
    NameError: __builtins__

    (using Debian's python-epydoc 2.1-5)

    Kludging around that in imports.py with:

    import __builtin__
    __builtins__ = __builtin__.__dict__

    generates a sequence of problems which I can't easily get around.

    Can you implement a config option to "ignore failed imports" to work
    around this java import problem?


  • Edward Loper

    Edward Loper - 2008-02-26

    Logged In: YES
    Originator: NO

    The current version of epydoc (epydoc 3.0) requires python 2.3+; and jython is stuck in the past at python 2.2. So for now, unfortunately, the jython support statement is "jython is not supported." I remain hopeful that one day jython will follow in cpython's footsteps and progress past version 2.2.


Log in to post a comment.