I would rather use futurize to generate a version of the code that works both under Python 2 and 3. http://python-future.org/automatic_conversion.html But be warned that you will likely have to fix some issues manually. -- Olivier