[Scons-dev] no more print statements in SConscripts?

Tim Jenness tjenness at lsst.org
Wed May 25 19:24:04 EDT 2016


> On May 25, 2016, at 16:13, Alexandre Feblot <alexandre at feblot.fr> wrote:
> 
> 
> 
> Obviously, not introducing any "api break" would be the best, but I don't see where Tim suggests a solution. Tim wrote about "removing print statements from his SConscripts", which is exactly the painful case I described.
> 

I don’t think I suggested that. I (thought I) was suggesting that the code in scons that loads the SConscript files should not itself include any print statements so that there would be no need to enable print_function in that file.

For simple prints in that file you also have the option of doing

print(some_string)

which works on both 2.7 and 3.x regardless because in 2.7 those parentheses disappear. It’s only when commas start turning up that you need print_function enabled.

— 
Tim Jenness



More information about the Scons-dev mailing list