[Python-ideas] PEP x: Static module/package inspection

anatoly techtonik techtonik at gmail.com
Thu Feb 2 09:41:39 CET 2012

A rather user friendly proof of the concept with `ast` module is ready.

`astdump` contains get_top_vars() method, which extracts sufficient
information from module's AST to generate setup.py for itself. This
capability can already be reused for plugin version discovery mechanisms.
ISTM the working library should motivate authors better than a PEP
convention. =)

`astdump` doesn't provide complete module introspection capabilities. I've
primarily focused on getting the output done, so for a proper API it would
be nice to study use case examples first. `astdump` contains tree walker
with filtering capabilities by node type and level. What "python-object"
should expose and how to make this convenient is not completely clear for
anatoly t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120202/a112eaa4/attachment.html>

More information about the Python-ideas mailing list