emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Stanton <stanton@haas.berkeley.edu>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: "'emacs-orgmode@gnu.org'" <emacs-orgmode@gnu.org>
Subject: Re: Python code block hangs with :session if python-mode is loaded
Date: Sun, 1 Apr 2012 08:37:15 -0700	[thread overview]
Message-ID: <40C7B1BFC291ED4E9D10436D07736A334702EB9EEA@EXMAIL7.haas.uc.berkeley.edu> (raw)
In-Reply-To: <877gxzwr9f.fsf@gmx.com>

> 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" on
> 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?
> 
> Best,
> 
> Footnotes:
> [1]  *Python*
> >>> print "%d + %d = %d" % (2, 3, 2+3)
> 2 + 3 = 5
> 2**5
> >>>
> 32
> >>>
> >>>
> >>> 'org_babel_python_eoe'
> >>> 'org_babel_python_eoe'
> >>> print "%d + %d = %d" % (2, 3, 2+3)
> 2 + 3 = 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 default 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.1500 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]: 
In [2]: print "%d + %d = %d" % (2, 3, 2+3)
2**5



2 + 3 = 5

In [3]: Out[3]: 32

In [4]: 
In [4]: 
In [4]: 'org_babel_python_eoe'

In [4]: Out[4]: 'org_babel_python_eoe'

In [5]:

----------------

  reply	other threads:[~2012-04-01 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 22:40 Python code block hangs with :session if python-mode is loaded Richard Stanton
2012-04-01 12:50 ` Eric Schulte
2012-04-01 15:37   ` Richard Stanton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-31 23:02 Richard Stanton
2012-04-01 16:19 Rustom Mody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40C7B1BFC291ED4E9D10436D07736A334702EB9EEA@EXMAIL7.haas.uc.berkeley.edu \
    --to=stanton@haas.berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).