Running a Jupyter notebook from another notebook : <p>I wonder if it is possible to run a *.ipynb file from another *.ipynb file and get a returned value.
I know that we can run like this:</p>

<pre><code>%run ./called_notebook.ipynb
</code></pre>

<p>the called_notebook contains:</p>

<pre><code>def foo():
    print(1)
    return 2
foo()
</code></pre>

<p>But it only prints "1" without giving me the opportunity to handle the returned value. Is it even possible ? Does the following kind of code even exist :</p>

<pre><code>a = %run ./called_notebook.ipynb
</code></pre>

<p>?</p>

<p>Thanks !</p>
