Re: [O] Problem with python session

2016-10-12 Thread William Henney
Yep, I agree. This is a wart in the vanilla python REPL, and org-mode can't really do much about it. Except maybe warn people. As John noted, this is less of a problem if you use ipython as your REPL. I think it is enough to just do #+BEGIN_SRC emacs-lisp (setq org-babel-python-command

Re: [O] Problem with python session

2016-10-11 Thread Nicolas Goaziou
Hello, John Kitchin writes: > I am not sure it makes sense to change anything for this. Noted. Thank you for the feedback. Regards, -- Nicolas Goaziou

Re: [O] Problem with python session

2016-10-10 Thread John Kitchin
I am not sure it makes sense to change anything for this. There is different behavior with scripts and the interpreter independently of org-mode, e.g. with python -i: >>> for i in range(3): ... print(i) ... i File "", line 3 i ^ SyntaxError: invalid syntax Vanilla python sessions

Re: [O] Problem with python session

2016-10-09 Thread Nicolas Goaziou
Hello, William Henney writes: > I can reproduce your problem. This is (arguably) a bug in ob-python when > using the vanilla python interpreter together with the :session argument. > You can work around it by putting a blank line after the for-loop in your > second code

Re: [O] Problem with python session

2016-10-06 Thread William Henney
Hi Florian I can reproduce your problem. This is (arguably) a bug in ob-python when using the vanilla python interpreter together with the :session argument. You can work around it by putting a blank line after the for-loop in your second code block. I say that it is arguable that this is a bug

[O] Problem with python session

2016-10-06 Thread Florian Lindner
Hello, I have an org file: * Overview of available basis functions #+BEGIN_SRC python :session generateBFpics :exports results :results file import matplotlib.pyplot as plt import numpy as np def set_plotoptions(): plt.xlabel("x") plt.ylabel("$\phi(x)$") plt.grid()