sphinx_nbexamples/__init__.py
def create_thumb(self):
        """Create the thumbnail for html output"""
        thumbnail_figure = self.copy_thumbnail_figure()
        if thumbnail_figure is not None:
            if isinstance(thumbnail_figure, six.string_types):
                pic = thumbnail_figure
            else:
                pic = self.pictures[thumbnail_figure]
            self.save_thumbnail(pic)
        else:
            for pic in self.pictures[::-1]:
                if pic.endswith('png'):
                    self.save_thumbnail(pic)
                    return
def create_thumb(self):
        thumbnail_figure = self.copy_thumbnail_figure()
        if thumbnail_figure is not None:
            if isinstance(thumbnail_figure, six.string_types):
                pic = thumbnail_figure
            else:
                pic = self.pictures[thumbnail_figure]
            self.save_thumbnail(pic)
        else:
            for pic in self.pictures[::-1]:
                if pic.endswith('png'):
                    self.save_thumbnail(pic)
                    return
def create_thumb ( self ) : thumbnail_figure = self . copy_thumbnail_figure ( ) if thumbnail_figure is not None : if isinstance ( thumbnail_figure , six . string_types ) : pic = thumbnail_figure else : pic = self . pictures [ thumbnail_figure ] self . save_thumbnail ( pic ) else : for pic in self . pictures [ : : - 1 ] : if pic . endswith ( 'png' ) : self . save_thumbnail ( pic ) return
Create the thumbnail for html output
Create the thumbnail for html output