You are viewing an older version (9.12.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.12.0 / IPython / core / magics / osm / OSMagics / writefile

function

IPython.core.magics.osm:OSMagics.writefile

source: /IPython/core/magics/osm.py :823

Signature

def   writefile ( self line cell )

Summary

::

Extended Summary

%writefile [-a] filename

Write the contents of the cell to a file.

The file will be overwritten unless the -a (--append) flag is specified.

positional arguments:

filename file to write

options:

-a, --append Append contents of the cell to an existing file. The file will be created if it does not exist.

Aliases

  • IPython.core.magics.OSMagics.writefile