Subscribe to RSS Feed

Creating Documentation from Python Source Files with Doxygen and doxypy

Feb 4th, 2008 by Joshua Scotton

doxygen.png

I was recently generating some documentation from the Entertainer source code and decided to share how I managed to do it.

I’m assuming python 2.4 is installed on your system.

First install doxygen and graphviz

sudo apt-get install doxygen graphviz

Download the latest version of doxypy from http://code.foosel.org/doxypy and extract to a suitable location.

I used doxypy-0.3rc2.tar.gz

Now we need to generate a configuration file, to do this run the following from your project root folder

doxygen -g config.dox

Edit the file and set the following tags:

PROJECT_NAME = #Your Project Name would go here
PROJECT_NUMBER = #Your version/revision number goes here
OUTPUT_DIRECTORY = #Where you want the documentation going
FILE_PATTERNS = *.py
RECURSIVE = YES
INPUT_FILTER = "python /path/to/doxypy.py" #set this to where you extracted doxypy
FILTER_SOURCE_FILES = YES
INPUT = #where the source files are

If you want graphs also edit the following:

HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES

Run the following:

whereis dot
and enter the output into the following config tag:

DOT_PATH = /usr/bin/dot

Next ones are optional:

MULTILINE_CPP_IS_BRIEF = YES
DETAILS_AT_TOP = YES
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
SHOW_DIRECTORIES = YES
SOURCE_BROWSER = YES
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 8
TOC_EXPAND = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
GENERATE_LATEX =YES

All set up now…

All we need to do now whenever you want to generate/regenerate the documentation is to run the following from the project root folder:

doxygen config.dox

Thanks to internetducttape.com as I used this blog entry as a starting point.

Post to Twitter Post to Delicious Post to Digg Post to Facebook

Tags: , , , , ,

15 Responses to “Creating Documentation from Python Source Files with Doxygen and doxypy”

  1. quiznos
    July 21, 2011 at 2:02 pm

    Eventuellement je peux fournir les url pour d’autres d’échantillons à propos de ce theme. Ecrivez moi par mail:

  2. astuce cityville facebook
    July 21, 2011 at 3:45 pm

    Pourquoi ne pas rapporter les significations expliquées les journées derniere par le ministere national? Au minimum on pourrait argumenter avec les véritables taux

  3. police workout program
    August 8, 2011 at 10:42 pm

    Its like you learn my thoughts! You appear to understand a lot approximately this, such as you wrote the book in it or something. I believe that you just can do with some percent to pressure the message house a bit, but other than that, this is magnificent blog. A fantastic read. I’ll certainly be back.

  4. shin splints symptoms wiki
    September 18, 2011 at 7:23 am

    I’d need to talk with you here. Which isn’t something I usually do! I quite like reading a post that should get people to believe. Also, appreciate your permitting me to comment!

  5. ipad battery extender
    September 18, 2011 at 11:59 am

    Your article is generally adorable. Thank you for this good article. It’ll be fairly beneficial to keep in thoughts each one of these guidelines.

  6. Gaylord Argo
    September 19, 2011 at 10:20 pm

    Saint Maxime is a luxurious destination largely due to the Massif des Maures.

  7. Lamont Vallentine
    October 7, 2011 at 5:10 am

    Hi there, just became aware of your blog through Google, and found that it is truly informative. I’m going to watch out for brussels. I will appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!

  8. Italian Greyhound
    October 7, 2011 at 6:10 am

    Touching. Interesting website.

  9. Danial Hupper
    October 8, 2011 at 7:22 am

    Hi there, You’ve done an excellent job. I will definitely digg it and personally suggest to my friends. I am sure they will be benefited from this website.

  10. Fabiola Corral
    October 23, 2011 at 10:59 pm

    I don’t even know how I ended up here, but I thought this post was great. I don’t know who you are but certainly you are going to a famous blogger if you aren’t already ;) Cheers!

  11. roof weathervanes
    October 31, 2011 at 12:45 am

    Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me mad so any assistance is very much appreciated.

  12. current home mortgage interest rate
    November 2, 2011 at 10:49 pm

    Have you ever considered about adding a little bit more than just your articles? I mean, what you say is important and all. Nevertheless think of if you added some great visuals or video clips to give your posts more, “pop”! Your content is excellent but with pics and videos, this blog could undeniably be one of the most beneficial in its niche. Excellent blog!

  13. Ervin Locantore
    November 3, 2011 at 11:55 am

    I was wondering if you ever considered changing the structure of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 pictures. Maybe you could space it out better?

  14. Sweet Sixteen Invitations
    November 7, 2011 at 8:24 am

    Greetings! I’ve been following your site for a while now and finally got the courage to go ahead and give you a shout out from Houston Tx! Just wanted to tell you keep up the excellent work!

  15. Bert Cruff
    December 19, 2011 at 4:42 am

    I’ve recently started a website, the info you offer on this site has helped me greatly. Thanks for all of your time & work.

Leave a Reply

Calendar

February 2012
M T W T F S S
« Dec    
 12345
6789101112
13141516171819
20212223242526
272829