If you do not fear \write18 and have a recent version of pygments installed, you can use minted package.
\write18
pygments
minted