From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Stanton Subject: Re: Python code block hangs with :session if python-mode is loaded Date: Sun, 1 Apr 2012 08:37:15 -0700 Message-ID: <40C7B1BFC291ED4E9D10436D07736A334702EB9EEA@EXMAIL7.haas.uc.berkeley.edu> References: <40C7B1BFC291ED4E9D10436D07736A334702EB9E79@EXMAIL7.haas.uc.berkeley.edu> <877gxzwr9f.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEMqR-00007c-LN for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 11:37:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEMqP-0001Eq-BT for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 11:37:31 -0400 Received: from gateway-b.haas.berkeley.edu ([128.32.222.40]:15184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEMqP-0001EO-5L for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 11:37:29 -0400 In-Reply-To: <877gxzwr9f.fsf@gmx.com> Content-Language: en-US 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: Eric Schulte Cc: "'emacs-orgmode@gnu.org'" > The above executes without problem for me regardless of whether python- > mode has been explicitly loaded. I have python mode py-version "5.1.0" o= n > my machine. My guess is that python-mode changed the session prompt in > such a way that Babel can not tell when execution has completed. I have > the following in my *Python* session buffer after execution [1], what are > the contents of your *Python* session buffer after you have C-g'd out of = the > loop? >=20 > Best, >=20 > Footnotes: > [1] *Python* > >>> print "%d + %d =3D %d" % (2, 3, 2+3) > 2 + 3 =3D 5 > 2**5 > >>> > 32 > >>> > >>> > >>> 'org_babel_python_eoe' > >>> 'org_babel_python_eoe' > >>> print "%d + %d =3D %d" % (2, 3, 2+3) > 2 + 3 =3D 5 > >>> 2**5 > 32 > >>> > >>> > >>> > >>> 'org_babel_python_eoe' > 'org_babel_python_eoe' > >>> > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ Hi Eric. I'm using python-mode 6.0.6, and have it set up to use ipython as the defau= lt python shell. Here's what I see: -------------- Enthought Python Distribution -- www.enthought.com Python 2.7.2 |EPD 7.2-2 (32-bit)| (default, Sep 14 2011, 11:02:05) [MSC v.1= 500 32 bit (Intel)] Type "copyright", "credits" or "license" for more information. IPython 0.12 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]:=20 In [2]: print "%d + %d =3D %d" % (2, 3, 2+3) 2**5 2 + 3 =3D 5 In [3]: Out[3]: 32 In [4]:=20 In [4]:=20 In [4]: 'org_babel_python_eoe' In [4]: Out[4]: 'org_babel_python_eoe' In [5]: ----------------