2TO3-3.3(1)
β¨ 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 thatprint()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 πΈπ«Ά
π¦ where this page comes from
- debian bookworm: 2to3 3.11.2-1
- ubuntu jammy: 2to3 3.10.4-0ubuntu2
- ubuntu jammy: 2to3 3.10.6-1~22.04
- ubuntu jammy: 2to3 3.10.6-1~22.04.1
- ubuntu noble: 2to3 3.12.3-0ubuntu1
- ubuntu noble: 2to3 3.12.3-0ubuntu2.1
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms