[IPython-dev] remove --script?
zvoros at gmail.com
Thu Oct 24 10:14:59 EDT 2013
On 24/10/13 16:02, davidacoder wrote:
> Hm, that seems a different problem, i.e. when an import happens and how to
> trigger that.
> I was referring to a situation where I have one notebook where I might
> define a function, and then I have another notebook where I want to use that
> function. If I could %run the first notebook from the second, there wouldn't
> be a need to ever generate a .py file from the first notebook that I then
> import in the second (irrespective of whether I do that via autoreload or
> not). I might be missing something, though, pretty new to ipython :)
I see your point, and that is what I replied to: if you have a function
in notebook1, and want to use that in notebook2, then before running the
code in notebook2, one could check, whether notebook1 has changed
(meaning, it has been saved to disc) since whatever point in time, and
if so, then re-run that notebook. autoreload does something similar,
except, it doesn't check, whether the module has changed, it just
re-loads it before running the code.
More information about the IPython-dev