import parser from pprint import pprint f= file("c:\\python24\\lib\\bsddb\\__init__.py").read() pprint(parser.ast2list(parser.suite(f)))