skills/skills.volces.com/py2py3-converter

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:

  • print statements → print() function calls
  • raw_input()input()
  • xrange()range()
  • unicode()str()
  • basestringstr
  • long type → int
  • dict.has_key(k)k in dict
Installs
11
First Seen
Apr 21, 2026