All single quotes in code samples are displayed as backticks and the copy-pasted code can't be compiled without fixing the quotation. Is it possible to prevent this?
for example:
\documentclass{beamer}
\usepackage{listings}
\begin{document}
\lstset{language=Python}
\begin{frame}[fragile]{Code}
\begin{lstlisting}
print 'hi'
\end{lstlisting}
\end{frame}
\end{document}
Compiled with latexmk -pdf file.tex, which creates a log starting like: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013).
Output:


\documentclass{...}and ending with\end{document}) that produces the problem behavior you're looking to fix. – Mico Nov 17 '13 at 05:38