emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Python source block and :dir header arg


From: John Kitchin
Subject: Re: [O] Python source block and :dir header arg
Date: Fri, 5 Apr 2019 10:34:53 -0400

I updated to the latest org, and I am not sure if you are seeing a bug. You might need to fix the space between : and session in your example, and name the session something. Also, you need to make sure the directory exists. This example works as expected for me:

#+begin_src python :results output :session t :dir ./run
import os
cwd = os.getcwd()
print("dir: ", cwd)
#+end_src

#+RESULTS:
: dir:  /Users/jkitchin/Box Sync/kitchingroup/jkitchin/journal/2019/04/05/run

There are still some subtle possible issues, e.g. you cannot change the :dir after you run this in a session. I am not sure why. Personally I prefer ipython for sessions.

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Wed, Apr 3, 2019 at 1:31 PM Joao Cortes <address@hidden> wrote:
Thanks for checking. Do you know what to do now, assuming It is a bug?


reply via email to

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