[IPython-dev] remove --script?

davidacoder davidacoder at hotmail.com
Thu Oct 24 10:21:19 EDT 2013


But right now one cannot run notebook1 from notebook2 at all, right? Or am I
missing something there? %run notebook1.ipynb doesn't seem to work... Or is
there some other way to run notebook1 from notebook2? I looked around for
quite a while and didn't find anything.

-----Original Message-----
From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org]
On Behalf Of Zoltán Vörös
Sent: Thursday, October 24, 2013 10:15 AM
To: ipython-dev at scipy.org
Subject: Re: [IPython-dev] remove --script?


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.

Zoltán
_______________________________________________
IPython-dev mailing list
IPython-dev at scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-dev



More information about the IPython-dev mailing list