py2py3-converter
SKILL.md
py2py3-converter
1. Introduction
py2py3-converter is an OpenClaw skill that automatically converts legacy Python 2 code to modern Python 3 syntax. It handles the most common migration patterns, generates compatibility reports, and creates unit tests for the converted code.
Python 2 reached end-of-life on January 1, 2020, yet many codebases still contain Python 2 code. This skill automates the tedious work of manual migration, reducing human error and accelerating the upgrade process.
2. Core Capabilities
Conversion Logic
The converter handles these Python 2 → 3 transformations:
printstatements →print()function callsraw_input()→input()xrange()→range()unicode()→str()basestring→strlongtype →intdict.has_key(k)→k in dict