This is a development version (latest) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython latest / IPython / core / magics / osm / OSMagics / pycat

function

IPython.core.magics.osm:OSMagics.pycat

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

Signature

def   pycat ( self parameter_s = '' )

Summary

Show a syntax-highlighted file through a pager.

Extended Summary

This magic is similar to the cat utility, but it will assume the file to be Python source and will show it with syntax highlighting.

This magic command can either take a local filename, an url, an history range (see %history) or a macro as argument.

If no parameter is given, prints out history of current session up to this point.

%pycat myscript.py
%pycat 7-27
%pycat myMacro
%pycat http://www.example.com/myscript.py

Aliases

  • IPython.core.magics.OSMagics.pycat