So apparently org-babel is evaluating python code inside its own function, perhaps when calling the interpreter or to be able to return the #+RESULTS: I guess. How to instruct it to evaluate the same way that the python mode does (say C-c ' and C-c C-c) ?
Example :
#+Begin_src python
from math import *
#+end_src
Evaluating to python3 directly from org spits in Org-Babel Error Output :
File "<stdin>", line 2
SyntaxError: import * only allowed at module level
Python 2.7 being more permissive, illustrating the situation called for a different example
#+Begin_src python
from Tkinter import *
class MainWindow():
def __init__(self,parent):
# the following line stumbles on the problem
Frame(self , parent)
pass
Tk()
#+end_src
I'm pretty sure there's an option to bypass the case. What could it be ?
#+Begin_src python :session