2TO3-2.7(1)

πŸ“¦ version 2.7.18, in ubuntu jammy

✨ 2to3-2.7 ✨ (2TO3-2.7(1) User Commands) πŸ¦‹

okay bestie, this is the manual page for 2to3-2.7, the Python2 to Python3 converter πŸ’– it's literally the tool that glows up your old Python 2 code so it can run on Python 3 πŸ”₯ no cap, it's iconic.


πŸŽ€ SYNOPSIS πŸŽ€

2to3 [options] file|dir ...

okay so you hand it a file or a dir (or a bunch of them) and it does its thing πŸ’…


🌸 OPTIONS 🌸

  • -h, --help β€” shows the help message and exits 🫢
  • -d, --doctests_only β€” fixes up doctests only 🧚
  • -f FIX, --fix=FIX β€” each FIX specifies a transformation; the default is all of them ✨ so it's giving full makeover energy
  • -j PROCESSES, --processes=PROCESSES β€” runs 2to3 concurrently πŸ”₯
  • -x NOFIX, --nofix=NOFIX β€” stops a transformation from running πŸ’€ bye bye, not you
  • -l, --list-fixes β€” lists the available transformations πŸ“
  • -p, --print-function β€” modifies the grammar so that print() is a function πŸ‘‘ bestie finally gets her parentheses
  • -v, --verbose β€” gives you more verbose logging 🌈 extra tea, extra details
  • --no-diffs β€” doesn't show diffs of the refactoring πŸ™ˆ no peeking at the before and after
  • -w, --write β€” writes back the modified files πŸ’œ the changes actually stick
  • -n, --nobackups β€” doesn't write backups for modified files 😭 living dangerously, iykyk
ngl, --nobackups means there's no safety net for modified files, so use it with intention πŸ’€

2to3-2.7 2.7 January 2012 πŸ¦‹ that's the whole page, bestie! go be a main character in your Python 3 era πŸ’…πŸŒˆβœ¨

πŸ“¦ where this page comes from