Book Image

IPython Notebook Essentials

By : Luiz Felipe Martins
Book Image

IPython Notebook Essentials

By: Luiz Felipe Martins

Overview of this book

Table of Contents (15 chapters)
IPython Notebook Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Interacting with the operating system


Any code with some degree of complexity will interact with the computer's operating system when files must be opened and closed, scripts must be run, or online data must be accessed. Plain Python already has a lot of tools to access these facilities, and IPython and the notebook add another level of functionality and convenience.

Saving the notebook

The notebook is autosaved in periodic intervals. The default interval is 2 minutes, but this can be changed in the configuration files or using the %autosave magic. For example, to change the autosave interval to 5 minutes, run the following command:

%autosave 300

Notice that the time is entered in seconds. To disable the autosave feature, run the following command:

%autosave 0

We can also save the notebook using the File menu or by clicking on the disk icon on the toolbar. This creates a checkpoint. Checkpoints are stored in a hidden folder and can be restored from the File menu. Notice that only the latest...