Bare except clause removed from SMTPHandler.emit(). Now, only ImportError is trapped.
[python.git] / Doc / lib / libtabnanny.tex
blob12b9385b87175f399ae2e8fd5d6855fc1a9f001e
1 \section{\module{tabnanny} ---
2 Detection of ambiguous indentation}
4 % rudimentary documentation based on module comments, by Peter Funk
5 % <pf@artcom-gmbh.de>
7 \declaremodule{standard}{tabnanny}
8 \modulesynopsis{Tool for detecting white space related problems
9 in Python source files in a directory tree.}
10 \moduleauthor{Tim Peters}{tim_one@users.sourceforge.net}
11 \sectionauthor{Peter Funk}{pf@artcom-gmbh.de}
13 For the time being this module is intended to be called as a script.
14 However it is possible to import it into an IDE and use the function
15 \function{check()} described below.
17 \warning{The API provided by this module is likely to change
18 in future releases; such changes may not be backward compatible.}
20 \begin{funcdesc}{check}{file_or_dir}
21 If \var{file_or_dir} is a directory and not a symbolic link, then
22 recursively descend the directory tree named by \var{file_or_dir},
23 checking all \file{.py} files along the way. If \var{file_or_dir}
24 is an ordinary Python source file, it is checked for whitespace
25 related problems. The diagnostic messages are written to standard
26 output using the print statement.
27 \end{funcdesc}
30 \begin{datadesc}{verbose}
31 Flag indicating whether to print verbose messages.
32 This is incremented by the \code{-v} option if called as a script.
33 \end{datadesc}
36 \begin{datadesc}{filename_only}
37 Flag indicating whether to print only the filenames of files
38 containing whitespace related problems. This is set to true by the
39 \code{-q} option if called as a script.
40 \end{datadesc}
43 \begin{excdesc}{NannyNag}
44 Raised by \function{tokeneater()} if detecting an ambiguous indent.
45 Captured and handled in \function{check()}.
46 \end{excdesc}
49 \begin{funcdesc}{tokeneater}{type, token, start, end, line}
50 This function is used by \function{check()} as a callback parameter to
51 the function \function{tokenize.tokenize()}.
52 \end{funcdesc}
54 % XXX FIXME: Document \function{errprint},
55 % \function{format_witnesses} \class{Whitespace}
56 % check_equal, indents
57 % \function{reset_globals}
59 \begin{seealso}
60 \seemodule{tokenize}{Lexical scanner for Python source code.}
61 % XXX may be add a reference to IDLE?
62 \end{seealso}