emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] python sessions


From: Ista Zahn
Subject: Re: [O] python sessions
Date: Wed, 20 Mar 2013 14:32:23 -0400

On Wed, Mar 20, 2013 at 2:15 PM, Nick Dokos <address@hidden> wrote:
> John Hendy <address@hidden> wrote:
>
>> On Wed, Mar 20, 2013 at 12:25 PM, Nick Dokos <address@hidden> wrote:
>> > Andreas Röhler <address@hidden> wrote:
>> >
>> >> Seems `org-babel-execute':python doesn't get the session flag.
>> >>
>> >> Edebug: org-babel-execute:python
>> >> org-babel-execute:python
>> >> executing Python code block...
>> >>  [4 times]
>> >> Result: ((:comments . #1="") (:shebang . #1#) (:cache . "no")
>> >> (:padline . #1#) (:noweb . "no") (:tangle . "no") (:exports
>> >> . "results") (:results . "replace output") (:hlines . "no")
>> >> (:padnewline . "yes") (:session) (:result-type . output)
>> >
>> > Sure it does:           ^^^^^^^^^^
>> >
>> > What it does with it is another matter however. Am I missing something?
>>
>> I was thinking the concern was over not having the session named
>> properly, but might be wrong (Andreas could confirm).
>>
>
> I guessed Andreas tried with an unnamed session (but I agree it would be
> best if he confirms): afaics, if I use a session name, it's passed
> correctly in the params argument of org-babel-execute:python as
> (:session . "foo"), but in the later processing,
> org-babel-python-buffers is not set correctly.
>
>> I've not used python prior to this, but I use R almost daily in Org
>> and if I do #+begin_src R :session R, I get a buffer actually named
>> =R=. In this case, I expected the buffer name would be *PyFoo*.
>> Checking if it was an issue with asterisks, I used =:session py= and
>> still just get the default *Python* buffer created.
>>
>
> Yes, I think it's ob-python's problem: but as I said before, I don't
> understand why it works for you (and Ista Zahn).

I guess it depends on the definition of "works". I don't get python
buffers with the name of the :session variable. But I do get separate
python buffers (.e.g., *Python*, *Python*<2>) for each session, and
python blocks get executed in the right python process. To me that
equals "works", but if the issue is that the buffers don't get named
with the value of :session then no, that doesn't work for me either.

Best,
Ista

>
> Nick
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]