From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giacomo M Subject: my emacs hangs when using matplotlib with sessions Date: Tue, 3 Jul 2012 19:14:20 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b162db78d3be104c3f00bff Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm6gI-0003nK-6i for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 13:14:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm6gB-0001sg-C1 for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 13:14:29 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:42813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm6gB-0001rq-37 for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 13:14:23 -0400 Received: by pbbrp2 with SMTP id rp2so10702914pbb.0 for ; Tue, 03 Jul 2012 10:14:20 -0700 (PDT) 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: emacs-orgmode@gnu.org --047d7b162db78d3be104c3f00bff Content-Type: text/plain; charset=ISO-8859-1 Dear all, let say I have these lines: #+PROPERTY: session *py* #+PROPERTY: results output #+BEGIN_SRC python import matplotlib.pyplot as plt a=[1,2,3] #+END_SRC I execute the code block, no problem Then I execute this: #+BEGIN_SRC python plt.plot(a) #+END_SRC boom, emacs hangs result doesn't change if I write plt.plot(a) directly in the *Python* buffer activated by org-babel-pop-to-session. if I use pylab (interactive mode of matplotlib), I can see a window with the plot, but then the *Python* shell is unresponsive, and the only thing I can do is just killing it. Please note that #+BEGIN_SRC python :session none import matplotlib.pyplot as plt a=[1,2,3] plt.plot(a) plt.savefig('dummy.png') #+END_SRC works perfectly. It would be wonderful for me to be able to use sessions & matplotlib... So, thanks a lot for any suggestions! Giacomo M Python 2.7.2 win32 matplotlib 1.1.0 Emacs 24.1.1 (i386-mingw-nt5.1.2600) org-mode 7.8.11 --047d7b162db78d3be104c3f00bff Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all,
let say I have these lines:

#+PROPERTY: sessio= n *py*
#+PROPERTY: results output

#+BEGIN_SRC python
import matplotlib.pyplot = as plt
a=3D[1,2,3]
#+END_SRC

I execute the code block, no problem
Then I execute this:

#+BEGIN_SRC pythonplt.plot(a)
#+END_SRC

b= oom, emacs hangs
result doesn't change if I write plt.plot(a) direct= ly in the *Python* buffer activated by org-babel-pop-to-session.
if I us= e pylab (interactive mode of matplotlib), I can see a window with the plot,= but then the *Python* shell is unresponsive, and the only thing I can do i= s just killing it.

Please note that

#+BEGIN_SRC python :session none
import mat= plotlib.pyplot as plt
a=3D[1,2,3]
plt.plot(a)
plt.savefig('dummy.pn= g')
#+END_SRC

works perfectly.

It would be wonderful for me to be able to use = sessions & matplotlib...
So, thanks a lot for any suggestions!
Giacomo M


Python 2.7.2 win32
matplotlib 1.1.0
Emacs 24.1= .1 (i386-mingw-nt5.1.2600)
org-mode 7.8.11







--047d7b162db78d3be104c3f00bff--