[Python] Fix to conversion of samples from Python 3 to Python 2
Some calls to the print function weren't being converted to print statements correctly by 3to2, so now we use the alternative fix, which is to use the backported print function. Fixes Issue 216.
This commit is contained in:
parent
87553767d5
commit
217b396ec5
1 changed files with 1 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ if localenv['python_package'] == 'full':
|
|||
def convert_example(target, source, env):
|
||||
shutil.copyfile(source[0].abspath, target[0].abspath)
|
||||
subprocess.call(['3to2', '--no-diff', '-n', '-w','-x', 'str',
|
||||
'-f', 'all', '-f', 'printfunction', '-x', 'print',
|
||||
'-x', 'open', target[0].abspath])
|
||||
|
||||
for subdir in subdirs('cantera/examples'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue