2to3(1)

2to31

Python2 to python3 converter

Usage

2to3 {[options] file | dir ...}

Options

-h, --help

show this help message and exit

-d, --doctests_only

Fix up doctests only

-f FIX, --fix=FIX

Each FIX specifies a transformation; default: all

-j PROCESSES, --processes=PROCESSES

Run 2to3 concurrently

-x NOFIX, --nofix=NOFIX

Prevent a transformation 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

Releases

6 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–9
  2. 10–12

From 2to3 3.11.2-1 in Debian 12 (Bookworm). Parsed by carta from the page's man source.