Use pyparse not pydoc.
Revert relative imports.