gregsexton / gregsexton/ob-ipython
Have ob-ipython respect :dir
- Dominant language
- Emacs Lisp
- Stars
- 742
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
It seems to me that ob-ipython will respect the :dir header argument when the kernel is started, but won't afterwards. Example:
```
* Header One
:PROPERTIES:
:header-args: :dir /home/header_one
:END:
#+BEGIN_SRC ipython
import os
os.getcwd()
#+END_SRC
#+RESULTS:
:RESULTS:
# Out[356]:
# text/plain
: '/home/header_one'
:END:
* Header Two
:PROPERTIES:
:header-args: :dir /home/header_two
:END:
#+BEGIN_SRC ipython
os.getcwd()
#+END_SRC
#+RESULTS:
:RESULTS:
# Out[357]:
# text/plain
: '/home/header_one'
:END:
```
I was wondering if there are any simple workarounds to overcome this issue?
Could one prepend a os.chdir() command if :dir is local and specified upon sending code to the kernel?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.