2TO3-2.7(1)
β¨ 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β runs2to3concurrently π₯-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 thatprint()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
- ubuntu jammy: python2.7 2.7.18-13ubuntu1
- ubuntu jammy: python2.7 2.7.18-13ubuntu1.5
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms