PyKD is a WinDbg extension that enables you writing Python scripts. It's open source.
Typically, the extension is not available side by side to any other DLL, so it is usually loaded with
.load x:\full\path\to\pykd.pyd, where PYD is the extension for a python DLL, but you can rename it to DLL if you like.
PyKD does not offer
!help, so look up the documentation at Codeplex. Many developers seem to be from Russia and the most up-to-date and complete documentation is probably in Russian. The Google translater does a decent job.
Like other extensions, use the correct bitness of the extension that corresponds to that of WinDbg. In addition to that you must have Python installed with the same bitness as well.
!py runs an REPL interpreter and
!py x:\path\to\script.py runs a python script. Scripts should use
from pykd import *
as the first line in order to make use of PyKD's functionality, while this line is not needed in the REPL interpreter. The interpreter can be exited using