From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: are babel python sessions and inlined images incompatible? Date: Wed, 24 Apr 2013 23:06:30 +0200 Message-ID: <86ehdzzlih.fsf@somewhere.org> References: <8738uhmget.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello Rodrigo, Rodrigo Amestica wrote: > Eric Schulte wrote: >> Rodrigo Amestica writes: >> >> > if I use this block >> > >> > #+BEGIN_SRC python :results file >> > from pylab import * >> > plot(rand(10)) >> > savefig('images/test.png') >> > return 'images/test.png' >> > #+END_SRC >> > >> > then the RESULTS block shows me an inlined version of the plot. >> > >> > If now I switch to this block >> > >> > #+BEGIN_SRC python :session test :results file >> > from pylab import * >> > plot(rand(10)) >> > savefig('images/test.png') >> > return 'images/test.png' >> > #+END_SRC > > many thanks for the feed back Eric! > >> You don't need to explicitly specify a return when working with a >> session. Either of the following should work. >> >> #+BEGIN_SRC python :session test :file "images/test.png" >> from pylab import * >> plot(rand(10)) >> savefig('images/test.png') >> #+END_SRC > > that does not quite work, I get no inlined image but the following line in the > Messages buffer > > orgtbl-format-line: Wrong type argument: sequencep, > #+BEGIN_SRC python :session test :results file >> from pylab import * >> plot(rand(10)) >> savefig('images/test.png') >> 'images/test.png' >> #+END_SRC > > that one works! Best regards, Seb -- Sebastien Vauban