Export (native) module documentation as Python source code -
to make python autocompletion possible, use jedi-vim parses python modules. script parses python modules , extracts interfaces , documentation strings them.
gdb has python scripting interface, unfortunately not classes (for example gdb.breakpoint
) available through public interface (the interfaces provided under /usr/share/gdb/python/
). other classes provided native c code in gdb
.
as workaround, export stub python script contains public properties, classes , functions including documentation (if available).
i have tried execute inspect.getsource(gdb)
in gdb shell (python print(...)
), throws ioerror: not find class definition
error. inspect
module provides interfaces facilitate in code generation, perhaps there exists module or script purpose of code generation provide documentation?
no existing application seems able generate code documentation attached. until now... hereby present pystubgen (pystubgen @ pypi)!
pystubgen
generates python source code module documentation purposes.
when supplied module, extract classes, functions , variables file , output valid python script documentation strings preserved.
the program uses parts pydoc
, further uses inspect
introspect modules , read documentation it. generate code gdb
, can invoke:
pystubgen$ pythonpath=$pwd gdb -q (gdb) python >import pystubgen >open('gdb.py', 'w').write(pystubgen.make_source(gdb)) >end (gdb) quit
here excerpt of resulting file gdb using pystubgen v0.1-1-g2c46ece:
class breakpoint(object): """ gdb breakpoint object """ def __delattr__(__unknown_params__): """ x.__delattr__('name') <==> del x.name """ def __init__(__unknown_params__): """ x.__init__(...) initializes x; see help(type(x)) signature """
@admin
ReplyDeleteThese are the values that we hold central to our practice. We create beautiful smiles as we focus on the overall health of your mouth. We encourage you to call or email us with any questions or concerns that you have so that we can better serve you.
Regards,
Dentist In unionville, CT