title: Pygments to latex better formatting for py code
body: <p>I am trying to include python code in my lyx document by inserting a file. I began by trying to use listings but this was causing code to overflow pages.
  Now I'm using pygments setting it up as described in this tutorial, <a href="http://wiki.lyx.org/Examples/IncludeExternalProgramListingUsingPygments" rel="nofollow">http://wiki.lyx.org/Examples/IncludeExternalProgramListingUsingPygments</a>. This appears to work fairly well but the code highlighting is off. for instance def and elif keywords are not highlighted and docstrings do not highlight if they are split over multiple lines.
  I have tried changing the style to a few different built in ones but this hasn't worked.
  Has anyone got a/ knows of a good way to highlight python code in the same way as idle does.
  Thanks.</p>