jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Errors in examples during install #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When installing r2920, a few errors in sample codes are reported:

1.   File 
"/opt/cantera/lib/python2.7/site-packages/cantera/examples/onedim/flamespeed_sen
sitivity.py", line 46
    print '\nmixture-averaged flamespeed = {:7f} m/s\n'.format(f.u[0])
                                                      ^
SyntaxError: invalid syntax

2.  File 
"/opt/cantera/lib/python2.7/site-packages/cantera/examples/reactors/sensitivity1
.py", line 59
    print '%10.3e %10.3f %10.3f %14.6e %10.3f %10.3f' %
                                                      ^
SyntaxError: invalid syntax

3. byte-compiling 
/opt/cantera/lib/python2.7/site-packages/cantera/examples/surface_chemistry/diam
ond_cvd.py to diamond_cvd.pyc
Sorry: IndentationError: unexpected indent (diamond_cvd.py, line 55)

Original issue reported on code.google.com by kyle.nie...@gmail.com on 1 May 2014 at 9:23

GoogleCodeExporter commented 9 years ago
It looks like the '3to2' script that's used generate the Python2-compatible 
examples isn't very smart about it's handling of the 'print' function. Either 
we need a better tool for doing the conversion, or we need to be careful to 
only use simple syntax with print statements in the examples.

Original comment by yarmond on 1 May 2014 at 9:58

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2952.

Original comment by yarmond on 23 May 2014 at 10:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r3026.

Original comment by yarmond on 20 Jun 2014 at 7:41