\section{Fine Control over Cheetah-generated Python modules}
\label{moduleFormatting}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Setting the source code encoding: \#encoding}
\label{moduleFormatting.encoding}

Including 
\begin{verbatim}
#encoding UTF-8
\end{verbatim}

in your Cheetah \code{.tmpl} file will result in 
\begin{verbatim}
# -*- coding: UTF-8 -*-
\end{verbatim}

being appended to the top of the \code{.py} module file that Cheetah's compiler generates.

See http://www.python.org/doc/2.3/whatsnew/section-encodings.html for more
details.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Setting the sh-bang: \#shBang}
\label{moduleFormatting.shBang}

Including 
\begin{verbatim}
#shBang #!/usr/local/bin/python2.3
\end{verbatim}

in your Cheetah \code{.tmpl} file will result in 
\begin{verbatim}
#!/usr/local/bin/python2.3
\end{verbatim}

being appended to the top of the \code{.py} module file that Cheetah's compiler generates.

The default sh-bang is 
\begin{verbatim}
#!/usr/bin/env python
\end{verbatim}

% Local Variables:
% TeX-master: "users_guide"
% End:      

% vim: shiftwidth=4 tabstop=4 expandtab
