Skip to content

Instantly share code, notes, and snippets.

@mvanveen
Created January 19, 2012 09:59
Show Gist options
  • Save mvanveen/1639137 to your computer and use it in GitHub Desktop.
Save mvanveen/1639137 to your computer and use it in GitHub Desktop.
Install a copy of pydoc in your local directory
from __future__ import with_statement
# above line is for backwards compatibility, don't use it interactively
import inspect
import os
import pydoc
with open('pydoc.py', 'w') as file_obj:
file_obj.write(inspect.getsource(inspect.getmodule(pydoc)))
os.system('python pydoc.py -g')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment