summaryrefslogtreecommitdiff
path: root/docs/devel_guide_src/comments.tex
diff options
context:
space:
mode:
Diffstat (limited to 'docs/devel_guide_src/comments.tex')
-rwxr-xr-xdocs/devel_guide_src/comments.tex100
1 files changed, 100 insertions, 0 deletions
diff --git a/docs/devel_guide_src/comments.tex b/docs/devel_guide_src/comments.tex
new file mode 100755
index 0000000..4a7bdbd
--- /dev/null
+++ b/docs/devel_guide_src/comments.tex
@@ -0,0 +1,100 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Directives: Comments}
+\label{comments}
+
+The template:
+
+\begin{verbatim}
+Text before the comment.
+## The comment.
+Text after the comment.
+#* A multi-line comment spanning several lines.
+ It spans several lines, too.
+*#
+Text after the multi-line comment.
+\end{verbatim}
+
+The output:
+
+\begin{verbatim}
+Text before the comment.
+Text after the comment.
+
+Text after the multi-line comment.
+
+\end{verbatim}
+
+The generated code:
+
+\begin{verbatim}
+ write('Text before the comment.\n')
+ # The comment.
+ write('Text after the comment.\n')
+ # A multi-line comment spanning several lines.
+ # It spans several lines, too.
+ write('\nText after the multi-line comment.\n')
+\end{verbatim}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Docstring and header comments}
+\label{comments.docstring}
+
+The template:
+\begin{verbatim}
+##doc: .respond() method comment.
+##doc-method: Another .respond() method comment.
+##doc-class: A class comment.
+##doc-module: A module comment.
+##header: A header comment.
+\end{verbatim}
+
+The output:
+\begin{verbatim}
+
+\end{verbatim}
+
+The beginning of the generated \code{.respond} method:
+\begin{verbatim}
+def respond(self,
+ trans=None,
+ dummyTrans=False,
+ VFS=valueFromSearchList,
+ VFN=valueForName,
+ getmtime=getmtime,
+ currentTime=time.time):
+
+ """
+ This is the main method generated by Cheetah
+ .respond() method comment.
+ Another .respond() method comment.
+ """
+\end{verbatim}
+
+The class docstring:
+\begin{verbatim}
+"""
+A class comment.
+
+Autogenerated by CHEETAH: The Python-Powered Template Engine
+"""
+\end{verbatim}
+
+The top of the module:
+\begin{verbatim}
+#!/usr/bin/env python
+# A header comment.
+
+"""A module comment.
+
+Autogenerated by CHEETAH: The Python-Powered Template Engine
+ CHEETAH VERSION: 0.9.13a1
+ Generation time: Fri Apr 26 22:39:23 2002
+ Source file: x.tmpl
+ Source file last modified: Fri Apr 26 22:36:23 2002
+"""
+\end{verbatim}
+
+
+% Local Variables:
+% TeX-master: "devel_guide"
+% End: