ENH: Nest Pyglet imports for CLI use

I tried to run some analysis code that needed `read_tab` from `expyfun` form the CLI (remote SSH login), and couldn't do it because importing `pyglet.window` requires an active X server. This protects the Pyglet imports so that such code can run.

Ready for review/merge @rkmaddox.
Newer versions of PEP8 get angry if comments start with more than one `#`, so I fixed these while digging around in there.