[IPython-User] Standard cells at the beginning of a new ipython notebook

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[IPython-User] Standard cells at the beginning of a new ipython notebook

Kirstie Whitaker
Hi IPythoners,

I have a few standard cells that I like to put at the beginning of each new notebook. Mostly they're standard imports and a few definitions that I use a lot. (For example the first cell is always: %load_ext autoreload, %autoreload 2, %matplotlib inline).

Does anyone have any good suggestions for how to have this appear automatically in a new notebook? At the moment I just open an old one and copy over each cell individually....but it seems like maybe there's a better way....

Thanks!
Kx

--
Kirstie Whitaker, PhD
Research Associate

Department of Psychiatry
University of Cambridge

Mailing Address
Brain Mapping Unit
Department of Psychiatry
Sir William Hardy Building
Downing Street
Cambridge CB2 3EB

Phone: +44 7583 535 307
Website: www.kirstiewhitaker.com

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: Standard cells at the beginning of a new ipython notebook

Vasco Tenner-2
Hi Kirstie,

On 01-12-14 12:48, Kirstie Whitaker wrote:

> Hi IPythoners,
>
> I have a few standard cells that I like to put at the beginning of each
> new notebook. Mostly they're standard imports and a few definitions that
> I use a lot. (For example the first cell is always: %load_ext
> autoreload, %autoreload 2, %matplotlib inline).
>
> Does anyone have any good suggestions for how to have this appear
> automatically in a new notebook? At the moment I just open an old one
> and copy over each cell individually....but it seems like maybe there's
> a better way....
One solution is to create a new template notebook, and copy that whole
notebook around (In the filebrowser I use, I can select new
file->Ipython notebook).

Vasco
Ps. The ipython-user list is not in use anymore. There is now only 1
ipython userlist: [hidden email]
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: [IPython-dev] Standard cells at the beginning of a new ipython notebook

Jacob Vanderplas
Hi,
Adrian Price-Whelan has a macrocell extension that does something like this: https://github.com/adrn/macro-cell
  Jake

 Jake VanderPlas
 Director of Research – Physical Sciences
 eScience Institute, University of Washington

On Mon, Dec 1, 2014 at 4:47 AM, Vasco <[hidden email]> wrote:
Hi Kirstie,

On 01-12-14 12:48, Kirstie Whitaker wrote:
> Hi IPythoners,
>
> I have a few standard cells that I like to put at the beginning of each
> new notebook. Mostly they're standard imports and a few definitions that
> I use a lot. (For example the first cell is always: %load_ext
> autoreload, %autoreload 2, %matplotlib inline).
>
> Does anyone have any good suggestions for how to have this appear
> automatically in a new notebook? At the moment I just open an old one
> and copy over each cell individually....but it seems like maybe there's
> a better way....
One solution is to create a new template notebook, and copy that whole
notebook around (In the filebrowser I use, I can select new
file->Ipython notebook).

Vasco
Ps. The ipython-user list is not in use anymore. There is now only 1
ipython userlist: [hidden email]
_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user