• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:control +full:- +full:regex

1 :mod:`compileall` --- Byte-compile Python libraries
5 :synopsis: Tools for byte-compiling all Python source files in a directory tree.
9 --------------
13 This module can be used to create the cached byte-code files at library
18 Command-line use
19 ----------------
21 This module can work as a script (using :program:`python -m compileall`) to
30 source files, traversed recursively. If no argument is given, behave as if
31 the command line was ``-l <directories from sys.path>``.
33 .. cmdoption:: -l
38 .. cmdoption:: -f
40 Force rebuild even if timestamps are up-to-date.
42 .. cmdoption:: -q
45 still be printed. If passed twice (``-qq``), all output is suppressed.
47 .. cmdoption:: -d destdir
51 byte-code file, where it will be used in tracebacks and other messages in
52 cases where the source file does not exist at the time the byte-code file is
55 .. cmdoption:: -x regex
57 regex is used to search the full path to each file considered for
58 compilation, and if the regex produces a match, the file is skipped.
60 .. cmdoption:: -i list
63 files and directories to compile. If ``list`` is ``-``, read lines from
66 .. cmdoption:: -b
68 Write the byte-code files to their legacy locations and names, which may
69 overwrite byte-code files created by another version of Python. The default
71 byte-code files from multiple versions of Python to coexist.
73 .. cmdoption:: -r
75 Control the maximum recursion level for subdirectories.
76 If this is given, then ``-l`` option will not be taken into account.
77 :program:`python -m compileall <directory> -r 0` is equivalent to
78 :program:`python -m compileall <directory> -l`.
80 .. cmdoption:: -j N
86 .. cmdoption:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
88 Control how the generated byte-code files are invalidated at runtime.
90 and size embedded will be generated. The ``checked-hash`` and
91 ``unchecked-hash`` values cause hash-based pycs to be generated. Hash-based
93 :ref:`pyc-invalidation` for more information on how Python validates
96 variable is not set, and ``checked-hash`` if the ``SOURCE_DATE_EPOCH``
100 Added the ``-i``, ``-b`` and ``-h`` options.
103 Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option
104 was changed to a multilevel value. ``-b`` will always produce a
105 byte-code file ending in ``.pyc``, never ``.pyo``.
108 Added the ``--invalidation-mode`` option.
111 There is no command-line option to control the optimization level used by the
113 provides the option: :program:`python -O -m compileall`.
121 ----------------
123 …levels=10, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalid…
134 byte-code file, where it will be used in tracebacks and other messages in
135 cases where the source file does not exist at the time the byte-code file is
138 If *force* is true, modules are re-compiled even if the timestamps are up to
149 If *legacy* is true, byte-code files are written to their legacy locations
150 and names, which may overwrite byte-code files created by another version of
152 names, which allows byte-code files from multiple versions of Python to
156 the built-in :func:`compile` function.
180 no matter what the value of *optimize* is.
183 Accepts a :term:`path-like object`.
194 …(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=…
201 byte-code file, where it will be used in tracebacks and other messages in
202 cases where the source file does not exist at the time the byte-code file is
213 If *legacy* is true, byte-code files are written to their legacy locations
214 and names, which may overwrite byte-code files created by another version of
216 names, which allows byte-code files from multiple versions of Python to
220 the built-in :func:`compile` function.
233 no matter what the value of *optimize* is.
241 …skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=…
243 Byte-compile all the :file:`.py` files found along ``sys.path``. Return a
259 no matter what the value of *optimize* is.
285 Byte-compile a single source file.