Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Python and Doxygen

python design pattern

  • Please log in to reply
2 replies to this topic

#1 denarced

denarced

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 181 posts

Posted 03 January 2011 - 03:30 AM

Hi,

I have a few classes of python and growing in my little project.
I used to inherit classes which Doxygen noticed and acted correctly but then I changed it.
Now I'm using the Decorator design pattern, meaning that I merely create an instance of the formerly inherited class and then extend or modify or what ever (code example @ bottom).
Doxygen does not understand this.
Anyone know a solution ?

class Super(object):
    def __init__(self):
        pass

class Decorated(object):
    def __init__(self):
        self.__super = Super()

    def __getattr__(self, attr):
        return getattr(self.__super, attr)

  • 0

#2 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 03 January 2011 - 04:27 PM

I am unaware if the Python module for Doxygen can do too much, it was not very much meant for that. Another choice of documenter which is official for Python is Sphinx:
Overview — Sphinx v1.0.5 documentation
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#3 denarced

denarced

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 181 posts

Posted 03 January 2011 - 09:52 PM

I am unaware if the Python module for Doxygen can do too much, it was not very much meant for that. Another choice of documenter which is official for Python is Sphinx:
Overview — Sphinx v1.0.5 documentation


I'll have to checkout sphinx .. thanks
  • 0





Also tagged with one or more of these keywords: python, design pattern

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download