How to get a python module name using ast? I tried the following to get the Module Node, but looks like it does not have the name information:
class v(ast.NodeVisitor):
def visit_Module(self, node):
print "Module : %s" % node
v().visit_Module(ast.parse(f.read(), filename))
I basically need the actual module name (If it is inside a package then the complete one like a.b.module).