I have been playing with the dis library to disassemble some Python source code, but I see that this does not recurse into functions or classes:
imp
Import the file as a module and call dis.dis() on that module.
import dis
import test
dis.dis(test)
You can also do this from the command-line:
python -m dis test.py
Quoting from the documentation for dis.dis:
For a module, it disassembles all functions.
Edit: As of python 3.7, dis.dis is recursive.