Similarly to this question I would like to evaluate (in org mode) Python source code blocks containing "input" instructions but I can't find a way to have an interactive evaluation (with user input) during evaluation or to give it some input known in advance (stored in a file for instance).
My constraint is to use explicitly the input
instruction since all this should be included in a textbook for students.
Example of code :
#+BEGIN_SRC python :results output
a= input("Value")
print(a)
#+END_SRC
Is it possible to have such an interactive evaluation or to simulate it (by giving to the source code a fake input) ?
export
to generate your example code for the students into some other format, e.g. html? – Melioratus Sep 6 '16 at 5:10noweb
, of org-mode that will allow you to test & export your code with results. – Melioratus Sep 6 '16 at 18:14