Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31734)

Unified Diff: Doc/library/compileall.rst

Issue 16104: Use multiprocessing in compileall script
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/compileall.py » ('j') | Lib/compileall.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/compileall.rst Mon Mar 10 19:31:52 2014 +0100
+++ b/Doc/library/compileall.rst Mon Mar 10 21:33:38 2014 +0200
@@ -65,9 +65,16 @@
is to write files to their :pep:`3147` locations and names, which allows
byte-code files from multiple versions of Python to coexist.
+.. cmdoption:: -j
+
+ Use multiple processes to compile the given directory.
+
.. versionchanged:: 3.2
Added the ``-i``, ``-b`` and ``-h`` options.
+.. versionchanged:: 3.5
+ Added the ``-j`` 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`.
@@ -75,7 +82,7 @@
Public functions
----------------
-.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=False, legacy=False, optimize=-1)
+.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=False, legacy=False, optimize=-1, processes=None)
Recursively descend the directory tree named by *dir*, compiling all :file:`.py`
files along the way.
@@ -108,9 +115,15 @@
*optimize* specifies the optimization level for the compiler. It is passed to
the built-in :func:`compile` function.
+ If *processes* is given, :mod:`concurrent.futures` will be used to fire up
eric.araujo 2014/03/12 06:48:47 Not sure if it’s useful to give the detail that co
+ a number of workers for processing the directory tree concurrently.
+
.. versionchanged:: 3.2
Added the *legacy* and *optimize* parameter.
+ .. versionchanged:: 3.5
+ Added the *processes* parameter.
+
.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=False, legacy=False, optimize=-1)
« no previous file with comments | « no previous file | Lib/compileall.py » ('j') | Lib/compileall.py » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+