Working on the ctypes wrappers some more this evening. Spent some time making the code generate names for the arguments. Got deeper and deeper into that until I realised I was considering rewriting the whole generation engine... that's generally a bad sign.
So, back up a little and look at something else. Realised that pydoc and pydoc.help() weren't supporting the ctypes functions. Okay, thinks I, look at pydoc and see what it's doing. Oh, forgot about the monolithic design. Well, what about wrapping some of the inspect methods? Adding a few features to the ctypes functions... and voila... they work with help, but they now don't show up at all in pydoc (they're not functions, but they're "routines" so they're not data, so they're not shown).
What would you need?
Something that can take a description of an object and render it to HTML or plain-text. Adapters for the common/built-in object types. Maybe a default adapter to just do an "str" on them.
Something that can process a namespace-of-objects and render it. Adapters for modules and classes that use the namespace rendering to produce internal documentation. Adapter from whole-system namespace to namespace type. This would require a mechanism to group and collect things-to-render for a given namespace (i.e. to get all the functions together, all the classes together, all the data-values together, all the modules together and provide descriptions of those types).
I'm sure someone has done something like this at some point. Just not sure where or who.
[Later] Should have guessed, looks like epydoc is already structured this way... too bad it's not available with the convenient help() method.
Pingbacks are closed.