\chapter: Extended, ensures that a pending module synopsis is written out
and then closes the .syn file for the preceeding chapter.
%
\RequirePackage{python}
+% support for module synopsis sections:
+\newcommand{\py@ModSynopsisFilename}{\jobname\thechapter.syn}
+\let\py@OldChapter=\chapter
+\renewcommand{\chapter}{
+ \py@ProcessModSynopsis
+ \py@closeModSynopsisFile
+ \py@OldChapter
+}
+
% Change the title page to look a bit better, and fit in with the
% fncychap ``Bjarne'' style a bit better.