From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: python :session and org_babel_python_eoe Date: Thu, 10 Feb 2011 17:46:19 +0000 Message-ID: <20110210174619.202459f9@bill> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=47913 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnaaS-000283-Qd for emacs-orgmode@gnu.org; Thu, 10 Feb 2011 12:45:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnaaR-0007GN-CZ for emacs-orgmode@gnu.org; Thu, 10 Feb 2011 12:45:48 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:41650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnaaR-0007Fz-7m for emacs-orgmode@gnu.org; Thu, 10 Feb 2011 12:45:47 -0500 Received: by eyh6 with SMTP id 6so858744eyh.0 for ; Thu, 10 Feb 2011 09:45:45 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, Is this behaviour expected?: #+begin_src python :session import sys #+end_src #+results: But in the python interpreter there is this: """ >>> import sys open('/home/myles/tmp/scratch/python-4938gzQ', 'w').write(str(_)) 'org_babel_python_eoe' >>> >>> >>> Traceback (most recent call last): File "", line 1, in NameError: name '_' is not defined >>> >>> >>> 'org_babel_python_eoe' >>> """ The sys module did indeed import correctly though. And that file (/home/myles/tmp/scratch/python-4938gzQ) is empty. Versions: - Python 2.7.1 (r271:86832, Jan 6 2011, 11:45:30) [GCC 4.5.2] on linux2 - orgmode from git 7473e3 Wed Feb 9 17:30 - GNU Emacs 23.2.1(x86_64-unknown-linux-gnu) It looks related to the issue, described as being fixed, in this thread: ("org-babel :session breaks returning things with python?") http://news.gmane.org/find-root.php?message_id=%3c871v669swp.fsf%40gmail.com%3e Thanks, Myles