Title: Theory / Unimportant / CS / Programming / Python / Lib / 26.6 2to3
Tags: computer_to_instruction fromCommandLine hasNotNewEffectReturnsMeaning
On every note of this deck, unless a note says otherwise:
Page: https://docs.python.org/3.3/library/2to3.html

Instruction: 2to3 foo
Page: https://docs.python.org/3.3/library/2to3.html
Effect: Edit the file foo to transform it into python3 file. Create a backup of the original file
Language: Python
Assuming: foo is a python2 script

Fla: -n
Effect: do not create backup file
Prefix: 2to3 foo

Fla: -w
Effect: cancel 2to3 using the backup file
Prefix: 2to3 foo

Fla: -l
Effect: Gives a list of fixer
Prefix: 2to3 foo

Name: A fixer
Definition: A rule to apply to transform python2 to python3
Page: https://docs.python.org/3.3/library/2to3.html
Context: 2to3

Page: https://docs.python.org/3.3/library/2to3.html
Effect: use the fixer bar
Language: Python
Context: 2to3 foo
Abbreviation: -f bar

Page: https://docs.python.org/3.3/library/2to3.html
Effect: do not use the fixer bar
Language: Python
Context: 2to3 foo
Abbreviation: -x bar

Instruction: all (as a fixer)
Page: https://docs.python.org/3.3/library/2to3.html
Effect: all default fixers
Language: Python
Context: 2to3 foo

Fla: --output-dir bar
Effect: output the python3 file to bar
Prefix: 2to3 foo
Flag abbreviation: -o bar

Fla: --write-unchanged-files
Effect: write output even if no change is required
Prefix: 2to3 foo
Flag abbreviation: -W

Fla: --add-suffix bar
Effect: transform plop.py into plopbar.py
Prefix: 2to3 foo