Try to import pygments.  Set pygments = None on failure.  Test pygments in wvp.code_directive to see whether to generate code block or plain block.  This conclude's EKR's initial futzing with the code.