Usage: futurize [options] file|dir ...
Options:
-h, --help show this help message and exit
-V, --version Report the version number of futurize
-a, --all-imports Add all __future__ and future imports to each module
-1, --stage1 Modernize Python 2 code only; no compatibility with Python 3 (or
dependency on ``future``)
-2, --stage2 Take modernized (stage1) code and add a dependency on ``future`` to
provide Py3 compatibility.
-0, --both-stages Apply both stages 1 and 2
-u, --unicode-literals
Add ``from __future__ import unicode_literals`` to implicitly convert all
unadorned string literals '' into unicode strings
-f FIX, --fix=FIX Each FIX specifies a transformation; default: all. Either use '-f division
-f metaclass' etc. or use the fully-qualified module name: '-f
lib2to3.fixes.fix_types -f libfuturize.fixes.fix_unicode_keep_u'
-j PROCESSES, --processes=PROCESSES
Run 2to3 concurrently
-x NOFIX, --nofix=NOFIX
Prevent a fixer from being run.
-l, --list-fixes List available transformations
-p, --print-function Modify the grammar so that print() is a function
-v, --verbose More verbose logging
--no-diffs Don't show diffs of the refactoring
-w, --write Write back modified files
-n, --nobackups Don't write backups for modified files.
-o OUTPUT_DIR, --output-dir=OUTPUT_DIR
Put output files in this directory instead of overwriting the input files.
Requires -n. For Python >= 2.7 only.
-W, --write-unchanged-files
Also write files even if no changes were required (useful with --output-
dir); implies -w.
--add-suffix=ADD_SUFFIX
Append this string to all output filenames. Requires -n if non-empty. For
Python >= 2.7 only.ex: --add-suffix='3' will generate .py3 files.
Options (19)
| Option | Description | Source |
|---|
-h, --help | show this help message and exit | help |
-V, --version | Report the version number of futurize | help |
-a, --all-imports | Add all __future__ and future imports to each module | help |
-1, --stage1 | Modernize Python 2 code only; | help |
-2, --stage2 | Take modernized (stage1) code and add a dependency on ``future`` to provide Py3 compatibility. | help |
-0, --both-stages | Apply both stages 1 and 2 | help |
-u, --unicode-literals | Add ``from __future__ import unicode_literals`` to implicitly convert all unadorned string literals '' into unicode strings | help |
-f, --fix FIX | Each FIX specifies a transformation; | help |
-j, --processes PROCESSES | Run 2to3 concurrently | help |
-x, --nofix NOFIX | Prevent a fixer from being run. | help |
-l, --list-fixes | List available transformations | help |
-p, --print-function | Modify the grammar so that print() is a function | help |
-v, --verbose | More verbose logging | help |
--no-diffs | Don't show diffs of the refactoring | help |
-w, --write | Write back modified files | help |
-n, --nobackups | Don't write backups for modified files. | help |
-o, --output-dir OUTPUT_DIR | Put output files in this directory instead of overwriting the input files. | help |
-W, --write-unchanged-files | Also write files even if no changes were required (useful with --output- dir); | help |
--add-suffix ADD_SUFFIX | Append this string to all output filenames. | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.