From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodrigo Amestica Subject: Re: are babel python sessions and inlined images incompatible? Date: Tue, 23 Apr 2013 18:17:39 -0400 Message-ID: References: <8738uhmget.fsf@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUlWw-00023B-UO for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 18:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUlWv-0002hj-FS for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 18:17:42 -0400 Received: from karen.lavabit.com ([72.249.41.33]:59049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUlWv-0002hT-9F for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 18:17:41 -0400 In-Reply-To: <8738uhmget.fsf@gmail.com> 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 At Tue, 23 Apr 2013 07:29:50 -0600, Eric Schulte wrote: > > Rodrigo Amestica writes: > > > Hello, > > > > 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, or > > #+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! many thanks, Rodrigo > > Hope this helps, > > > > > then the RESULTS block does not show the inlined plot but this > > > > | | > > > > Using a session is kind of mandatory for me because I need several blocks to > > share variables. > > > > Is there something evidently wrong with my approach? > > > > thanks, > > Rodrigo > > > > > > -- > Eric Schulte > http://cs.unm.edu/~eschulte > > ____________________________________________________________________________________ > Your personal email. Anytime, anywhere. > Ridiculously affordable at $19.95. No contracts. > http://www.getpeek.com/lavabit.html > ____________________________________________________________________________________