environment/lib/python2.7/site-packages/IPython/core/oinspect.py
def pfile(self, obj, oname=''):
        """Show the whole file where an object was defined."""
        
        lineno = find_source_lines(obj)
        if lineno is None:
            self.noinfo('file', oname)
            return

        ofile = find_file(obj)
        # run contents of file through pager starting at line where the object
        # is defined, as long as the file isn't binary and is actually on the
        # filesystem.
        if ofile.endswith(('.so', '.dll', '.pyd')):
            print 'File %r is binary, not printing.' % ofile
        elif not os.path.isfile(ofile):
            print 'File %r does not exist, not printing.' % ofile
        else:
            # Print only text files, not extension binaries.  Note that
            # getsourcelines returns lineno with 1-offset and page() uses
            # 0-offset, so we must adjust.
            page.page(self.format(open(ofile).read()), lineno-1)
def pfile(self, obj, oname=''):
        lineno = find_source_lines(obj)
        if lineno is None:
            self.noinfo('file', oname)
            return

        ofile = find_file(obj)
        # run contents of file through pager starting at line where the object
        # is defined, as long as the file isn't binary and is actually on the
        # filesystem.
        if ofile.endswith(('.so', '.dll', '.pyd')):
            print 'File %r is binary, not printing.' % ofile
        elif not os.path.isfile(ofile):
            print 'File %r does not exist, not printing.' % ofile
        else:
            # Print only text files, not extension binaries.  Note that
            # getsourcelines returns lineno with 1-offset and page() uses
            # 0-offset, so we must adjust.
            page.page(self.format(open(ofile).read()), lineno-1)
def pfile ( self , obj , oname = '' ) : lineno = find_source_lines ( obj ) if lineno is None : self . noinfo ( 'file' , oname ) return ofile = find_file ( obj ) # run contents of file through pager starting at line where the object # is defined, as long as the file isn't binary and is actually on the # filesystem. if ofile . endswith ( ( '.so' , '.dll' , '.pyd' ) ) : print 'File %r is binary, not printing.' % ofile elif not os . path . isfile ( ofile ) : print 'File %r does not exist, not printing.' % ofile else : # Print only text files, not extension binaries.  Note that # getsourcelines returns lineno with 1-offset and page() uses # 0-offset, so we must adjust. page . page ( self . format ( open ( ofile ) . read ( ) ) , lineno - 1 )
Show the whole file where an object was defined.
Show the whole file where an object was defined .