| 1 |
|
| 2 |
from __future__ import print_function |
| 3 |
from __future__ import absolute_import |
| 4 |
from __future__ import division |
| 5 |
from __future__ import unicode_literals |
| 6 |
import glob |
| 7 |
from scriptlib import command |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
for filename in glob.iglob('**/*.py', recursive=True): |
| 12 |
if '/sympy/' in filename or filename.startswith('sympy/') or filename.endswith("/conv2to3.py"): |
| 13 |
continue |
| 14 |
output = command('2to3 %s' % filename) |
| 15 |
print(80*'-') |
| 16 |
if "RefactoringTool: No files need to be modified." in output: |
| 17 |
continue |
| 18 |
command('2to3 -w %s' % filename) |
| 19 |
command('meld %s.bak %s' % (filename, filename)) |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|