% taken from grass-promo/grassposter, written by me I think

\documentclass{standalone}

\usepackage[active,tightpage]{preview}
\usepackage{listings}
\PreviewEnvironment{lstlisting}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\input{listings_settings}

\begin{document}

\begin{lstlisting}[language=Python,linewidth=34.2em]
r_neighbors = Module('r.neighbors', input='elevation',
                     output='elevation_smooth',
                     method='median', flags='c')
# get result with alternative method
r_neighbors.inputs.method = 'mode'
r_neighbors.outputs.output = 'elevation_smooth_2'
r_neighbors.run()
\end{lstlisting}
\end{document}  