From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: org-babel -- Improper syntax error in session mode? Date: Sun, 19 Jun 2011 16:21:21 -0700 Message-ID: <87k4chwgpa.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYRJ5-0002HI-Nd for emacs-orgmode@gnu.org; Sun, 19 Jun 2011 19:21:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYRJ4-0000ti-1v for emacs-orgmode@gnu.org; Sun, 19 Jun 2011 19:21:31 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:47254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYRJ3-0000td-OZ for emacs-orgmode@gnu.org; Sun, 19 Jun 2011 19:21:29 -0400 Received: by pzk4 with SMTP id 4so3821994pzk.0 for ; Sun, 19 Jun 2011 16:21:28 -0700 (PDT) In-Reply-To: (Herbert Sitz's message of "Sun, 19 Jun 2011 21:54:07 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Herbert Sitz Cc: emacs-orgmode@gnu.org 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 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 "", line 4 > : print "Did it work?" > : ^ > : SyntaxError: invalid syntax > -------------------------------- > > > > -- Eric Schulte http://cs.unm.edu/~eschulte/