Hi Charles, "Charles C. Berry" <ccbe...@ucsd.edu> writes:
> Untested, but try this : > > #+name: localize > #+BEGIN_SRC emacs-lisp :var file="" srcinfo=(org-babel-get-src-block-info) > (let* ((dir (cdr (assoc :dir (nth 2 srcinfo)))) > (rfile (concat (file-name-as-directory dir) file)) > (lfile (car (last (split-string rfile ":"))))) > (copy-file rfile lfile 1) > lfile) > #+END_SRC > > then use > > #+HEADER: :post localize(*this*) > > in your python src block. It successfully extracts the :dir field. Thanks! Cheers, Benda