0

i have a python file with several classes in it and wanted to use epydoc to create a documentation from my comments. So i do on console on my Debian wheezy system:

epydoc --html storage_config_tool.py -o ~/

It always executes the python application and doc generation stops at 21%. The same behaviour when i use the epydocgui.

When I test it on a simple hello world program everything works fine. The file has > 1000 lines so i can't post it. The program itself works fine.

Has anbody any idea why does it happen? Can wrong formatting be a problem though a couldn't find any yet.

Thx 4 help

boFFeL
  • 31
  • 5

1 Answers1

0

Without seeing your code, it's hard to say what the problem is. However, it sounds as if the code to start the application is not protected by a if __name__ == '__main__': statement, so the application is run when epydoc imports the file. Two things that might help:

  1. Fix storage_config_tool.py so that only class, def, and assignment statements are executed when the module is imported.

  2. Use epydoc --html --parse-only storage_config_tool.py -o ~/ to generate the documentation. This skips the module import step, which may or may not be necessary for generating the complete documentation.

chepner
  • 497,756
  • 71
  • 530
  • 681
  • Yeah, thx man. Now i put the main part in if __name__ == '__main__': it works. Now it also says warnings with 7 markup errors. But i can work on this with verbose settings. – boFFeL May 08 '14 at 13:41