Start New Discussion within our Software Development Community

this is code that thanks to vegaseat helped me convert my programs into python30

# run_2to3_convert.py
#
# convert a Python25 code file to a Python30 code file
# generates a backup file and overwrites the original
# file with the converted file
#
# it is best to put this file into a special directory
# together with the Python25 file you want to convert
#
# run this program with Python30

import subprocess

# the Python2x code file you want to convert ...
python2x_scriptfile = "TryExcept1.py"

subprocess.call([r"C:\Python30\Python.exe",
    r"C:\Python30\Tools\Scripts\2to3.py",
    "-w",
    python2x_scriptfile])

print('props to vegaseat for showing me this')
input()
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.