removed unused imports from preview.py
Monkey-patch pyglet for doctesting
doctest: module docstring dependency check support