environment/lib/python2.7/site-packages/IPython/lib/demo.py
def reload(self):
        """Reload source from disk and initialize state."""
        # read data and parse into blocks
        self.fload()
        lines           = self.fobj.readlines()
        src_b           = [l for l in lines if l.strip()]
        nblocks         = len(src_b)
        self.src        = ''.join(lines)
        self._silent    = [False]*nblocks
        self._auto      = [True]*nblocks
        self.auto_all   = True
        self.nblocks    = nblocks
        self.src_blocks = src_b

        # also build syntax-highlighted source
        self.src_blocks_colored = map(self.ip_colorize,self.src_blocks)

        # ensure clean namespace and seek offset
        self.reset()
def reload(self):
        """Reload source from disk and initialize state."""
        # read data and parse into blocks
        self.fload()
        lines           = self.fobj.readlines()
        src_b           = [l for l in lines if l.strip()]
        nblocks         = len(src_b)
        self.src        = ''.join(lines)
        self._silent    = [False]*nblocks
        self._auto      = [True]*nblocks
        self.auto_all   = True
        self.nblocks    = nblocks
        self.src_blocks = src_b

        # also build syntax-highlighted source
        self.src_blocks_colored = map(self.ip_colorize,self.src_blocks)

        # ensure clean namespace and seek offset
        self.reset()
def reload ( self ) : # read data and parse into blocks self . fload ( ) lines = self . fobj . readlines ( ) src_b = [ l for l in lines if l . strip ( ) ] nblocks = len ( src_b ) self . src = '' . join ( lines ) self . _silent = [ False ] * nblocks self . _auto = [ True ] * nblocks self . auto_all = True self . nblocks = nblocks self . src_blocks = src_b # also build syntax-highlighted source self . src_blocks_colored = map ( self . ip_colorize , self . src_blocks ) # ensure clean namespace and seek offset self . reset ( )
Reload source from disk and initialize state.
Reload source from disk and initialize state .