environment/lib/python2.7/site-packages/IPython/lib/demo.py
def _get_index(self,index):
        """Get the current block index, validating and checking status.

        Returns None if the demo is finished"""

        if index is None:
            if self.finished:
                print >>io.stdout, 'Demo finished.  Use <demo_name>.reset() if you want to rerun it.'
                return None
            index = self.block_index
        else:
            self._validate_index(index)
        return index
def _get_index(self,index):
        if index is None:
            if self.finished:
                print >>io.stdout, 'Demo finished.  Use <demo_name>.reset() if you want to rerun it.'
                return None
            index = self.block_index
        else:
            self._validate_index(index)
        return index
def _get_index ( self , index ) : if index is None : if self . finished : print >> io . stdout , 'Demo finished.  Use <demo_name>.reset() if you want to rerun it.' return None index = self . block_index else : self . _validate_index ( index ) return index
Get the current block index, validating and checking status.

        Returns None if the demo is finished
Get the current block index validating and checking status .