DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Python (http://www.daniweb.com/forums/forum114.html)
-   -   API Maker (http://www.daniweb.com/forums/thread166626.html)

Paul Thompson Jan 6th, 2009 11:03 pm
API Maker
 
Hi
From using java and BlueJ i have found it quite easy to make your own api using inbuilt things in BlueJ. So i was wondering if there was anything in python that would take a python program and find all of the definitions and make an API from that, in which the API would have the arguments needed as well as the docstring and other comments.

So if anyone has heard of a tool that would do this that would be lovely,

cheers
Paul

Gribouillis Jan 7th, 2009 5:26 am
Re: API Maker
 
The pydoc module (used by the function 'help') finds all definitions in a module and produces text or html documentation. I read that it does this by importing the module first and then using objects introspection. If you look at the code of
pydoc.py
in your standard library, you should find tools to extract the api from the module. This could be a good starting point, with a lot of work already done.

Paul Thompson Jan 7th, 2009 6:51 am
Re: API Maker
 
cheers grib that works a treat, i like the HTML making it does, thanks!


All times are GMT -4. The time now is 11:03 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC