From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Joao Cortes <joaooneillcortes@outlook.pt>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Python source block and :dir header arg
Date: Fri, 5 Apr 2019 10:34:53 -0400 [thread overview]
Message-ID: <CAJ51ETo4p6fdvhaZRwLXz7QQ6Hz0C7aywfZA1ithz6di7OrupA@mail.gmail.com> (raw)
In-Reply-To: <AM6PR07MB5720A1DD24841D9F1CFE79FDA3570@AM6PR07MB5720.eurprd07.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
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
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Wed, Apr 3, 2019 at 1:31 PM Joao Cortes <joaooneillcortes@outlook.pt>
wrote:
> Thanks for checking. Do you know what to do now, assuming It is a bug?
>
>
[-- Attachment #2: Type: text/html, Size: 1907 bytes --]
next prev parent reply other threads:[~2019-04-05 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 17:06 Python source block and :dir header arg Joao Cortes
2019-04-01 18:12 ` John Kitchin
2019-04-01 18:23 ` Joao Cortes
2019-04-01 18:16 ` Joao Cortes
2019-04-02 15:59 ` John Kitchin
2019-04-03 17:31 ` Joao Cortes
2019-04-05 14:34 ` John Kitchin [this message]
2019-04-05 3:07 ` stardiviner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ51ETo4p6fdvhaZRwLXz7QQ6Hz0C7aywfZA1ithz6di7OrupA@mail.gmail.com \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=joaooneillcortes@outlook.pt \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).