IPython 8.4.0 Pypi GitHub Homepage
Other Docs
save(self, parameter_s='')

Usage:\

%save [options] filename [history]

Options:

-r: use 'raw' input. By default, the 'processed' history is used, so that magics are loaded in their transformed version to valid Python. If this option is given, the raw input as typed as the command line is used instead.

-f: force overwrite. If file exists, %save will prompt for overwrite unless -f is given.

-a: append to the file instead of overwriting it.

The history argument uses the same syntax as %history for input ranges, then saves the lines to the filename you specify.

If no ranges are specified, saves history of the current session up to this point.

It adds a '.py' extension to the file if you don't do so yourself, and it asks for confirmation before overwriting existing files.

If :None:None:`-r` option is used, the default extension is :None:None:`.ipy`.

Save a set of lines or a macro to a given filename.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/magics/code.py#183
type: <class 'function'>
Commit: