-
Python (
http://www.daniweb.com/forums/forum114.html)
- -
Code Snippet: using 2to3 (
http://www.daniweb.com/forums/thread217334.html)
| leegeorg07 | Apr 17th, 2009 4:07 am | |
| using 2to3 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()
| All times are GMT -4. The time now is 3:42 am. | |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC