Hi Herbert, I can confirm that I see the same behavior. Also, if I manually type the body of the code block into the session I get the same error output from Python, so I don't believe this is due to a problem with Babel.
Thanks -- Eric Herbert Sitz <hs...@nwlink.com> writes: > I have a code block that evaluates fine in non-session mode but which gives > syntax error in session mode. Since it works fine in non-session mode I > assume > this is a bug?: > > ---------------------------- > #+begin_src python :results output :session mypy > x = 1 > for i in range(1,5): > x = x + i > print x > print "Did it work?" > #+end_src > > #+results: > : File "<stdin>", line 4 > : print "Did it work?" > : ^ > : SyntaxError: invalid syntax > -------------------------------- > > > > -- Eric Schulte http://cs.unm.edu/~eschulte/