gregsexton / ob-ipython

org-babel integration with Jupyter for evaluation of (Python by default) code blocks
739 stars 109 forks source link

Printing a file link other than to png and svg image #65

Closed Xparx closed 8 years ago

Xparx commented 8 years ago

I sometimes produce data files and I am wondering if it's possible to print a link to them as a file path. In python for example I can do

#+begin_src python :results file
return "a/file/path.here"
#+end_src

#+RESULTS:
[[file:a/file/path.here]]
Xparx commented 8 years ago

Please disregard this issue. I am an idiot. The solution is to not print the path, i.e. to do

#+begin_src ipython :session :exports results :results file
"a/file/path.here"
#+end_src

#+RESULTS:
[[file:'a/file/path.here']]

Apologies for the noise.