allow recursion depth to be specified (closes #19628)

Patch from Claudiu Popa.
This commit is contained in:
Benjamin Peterson 2014-08-19 16:13:26 -05:00
parent 54b3b3fb2c
commit 344ff4ab2b
4 changed files with 59 additions and 1 deletions

View file

@ -66,9 +66,20 @@ compile Python sources.
is to write files to their :pep:`3147` locations and names, which allows
byte-code files from multiple versions of Python to coexist.
.. cmdoption:: -r
Control the maximum recursion level for subdirectories.
If this is given, then ``-l`` option will not be taken into account.
:program:`python -m compileall <directory> -r 0` is equivalent to
:program:`python -m compileall <directory> -l`.
.. versionchanged:: 3.2
Added the ``-i``, ``-b`` and ``-h`` options.
.. versionchanged:: 3.5
Added the ``-r`` option.
There is no command-line option to control the optimization level used by the
:func:`compile` function, because the Python interpreter itself already
provides the option: :program:`python -O -m compileall`.