2TO3-3.3(1)

πŸ“¦
version 3.12.3 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ 2to3-3.3 β€” Python2 to Python3 converter ✨

okay so bestie, this is the manual page for 2to3-3.3 πŸ¦‹ it's the tool that glows up your old Python 2 code into Python 3 code. literally the ultimate makeover πŸ’… (manual name: User Commands, section 1)

πŸŽ€ NAME

2to3-3.3 β€” the Python2 to Python3 converter. the whole glow-up in one line 🌸

πŸ’– SYNOPSIS

2to3 [options] file|dir ...

you hand it a file (or a whole directory, or a bunch of them) and it does the work. the [options] part is optional, so you can just vibe with the basics or get super specific ✨

🧚 OPTIONS ✨

  • -h, --help β€” shows the help message and then exits. the "I'm lost, help me" button 🫢
  • -d, --doctests_only β€” only fixes up the doctests and leaves everything else alone πŸ“
  • -f FIX, --fix=FIX β€” each FIX is one transformation you want applied. the default is all of them, so if you don't pick, it does everything πŸ‘‘
  • -j PROCESSES, --processes=PROCESSES β€” runs 2to3 concurrently, across PROCESSES workers. multitasking queen behavior πŸ”₯
  • -x NOFIX, --nofix=NOFIX β€” stops a specific transformation from running. the "not that one bestie" option πŸ™ˆ
  • -l, --list-fixes β€” lists all the available transformations so you can see your options πŸ’œ
  • -p, --print-function β€” modifies the grammar so that print() becomes a function. very Python 3 coded πŸ¦‹
  • -v, --verbose β€” gives you more verbose logging. for when you need the full play-by-play 🌈
  • --no-diffs β€” doesn't show the diffs of the refactoring. no receipts displayed πŸ™ˆ
  • -w, --write β€” writes the modified files back to disk. this is the one that actually saves the changes ✨
  • -n, --nobackups β€” doesn't write backups for the files it modifies. living on the edge πŸ’€

πŸ’– that's the whole page, bestie! source is 2to3-3.3 version 3.3 from January 2012, so it's a little vintage, but the vibes are still immaculate 🌸🫢