%pylab
is an IPython magic for matplotlib. It's equivalent to this:
import numpy
import matplotlib
from matplotlib import pylab, mlab, pyplot
np = numpy
plt = pyplot
from IPython.display import display
from IPython.core.pylabtools import figsize, getfigs
from pylab import *
from numpy import *
The positional argument inline
is specifying a matplotlib backend. Supported choices here depend on your platform and runtime (see matplotlib.rcsetup.all_backends
for options).
If you're not using Jupyter notebooks, you can do the same in an IPython session. You'll need to have installed matplotlib
in your Python environment.