[IPython-dev] Create New Notebook from Command-line

Zoltán Vörös zvoros at gmail.com
Sat Dec 6 16:51:03 EST 2014


A comment along similar lines: wouldn't it make sense to allow the user 
to automatically execute python code before a notebook is loaded, 
somewhat similarly to what is done on the javascript side with the 
content of  profile/startup/custom?

Often, I find myself in a similar situation: when the name of a notebook 
is of a particular form, I want to create a data folder for that 
notebook, want to have a specific first cell, etc.

If there was a place somewhere in profile/python/startup, whose python 
code were executed before the notebook is loaded, a lot of these 
problems could easily be solved, or delegated to the user.

Now, I don't know the security implications of such a mechanism, and 
this idea might have already been discussed and rejected by the core 
team, so I might be barking up the wrong tree...

Cheers,
Zoltán


On 12/05/2014 10:34 PM, Fernando Perez wrote:
>
> On Fri, Dec 5, 2014 at 11:25 AM, Andrew Gibiansky 
> <andrew.gibiansky at gmail.com <mailto:andrew.gibiansky at gmail.com>> wrote:
>
>     That's perfect and exactly the sort of thing I was looking for. I
>     looked around the IPython API but didn't quite get to the code
>     snippet you showed.
>
>
> Here's the old example Matthias referred to, updated to the new API 
> (this is basically what Matthias posted, as a notebook):
>
> http://nbviewer.ipython.org/gist/fperez/b3ab79a32b0e4777a646
>
> Cheers
>
> f
> -- 
> Fernando Perez (@fperez_org; http://fperez.org)
> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
> fernando.perez-at-berkeley: contact me here for any direct mail
>
>
> _______________________________________________
> 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