@line_magic<EOL><INDENT>def pfile(self, parameter_s='<STR_LIT>'):<DEDENT>
<EOL>out = self.shell._inspect('<STR_LIT>',parameter_s)<EOL>if out == '<STR_LIT>':<EOL><INDENT>try:<EOL><INDENT>filename = get_py_filename(parameter_s)<EOL><DEDENT>except IOError as msg:<EOL><INDENT>print(msg)<EOL>return<EOL><DEDENT>page.page(self.shell.inspector.format(open(filename).read()))<EOL><DEDENT>
Print (or run through pager) the file where an object is defined.

        The file opens at the line where the object definition begins. IPython
        will honor the environment variable PAGER if set, and otherwise will
        do its best to print the file in a convenient form.

        If the given argument is not an object currently defined, IPython will
        try to interpret it as a filename (automatically adding a .py extension
        if needed). You can thus use %pfile as a syntax highlighting code
        viewer.