예제 #1
0
파일: series.py 프로젝트: CrepeGoat/FEHnt
    def to_html_datatables(self,
                           fp: tp.Optional[FilePathOrFileLike] = None,
                           show: bool = True,
                           config: tp.Optional[DisplayConfig] = None) -> str:
        '''
        {}
        '''
        config = config or DisplayActive.get(type_show=False)
        config = config.to_display_config(
            display_format=DisplayFormats.HTML_DATATABLES, )
        content = repr(self.display(config))
        fp = write_optional_file(content=content, fp=fp)

        if show:
            import webbrowser
            webbrowser.open_new_tab(fp)
        return fp
예제 #2
0
    def to_html_datatables(
            self,
            fp: tp.Optional[PathSpecifierOrFileLike] = None,
            *,
            show: bool = True,
            config: tp.Optional[DisplayConfig] = None) -> tp.Optional[str]:
        '''
        {}
        '''
        config = config or DisplayActive.get(type_show=False)
        config = config.to_display_config(
            display_format=DisplayFormats.HTML_DATATABLES, )
        content = repr(self.display(config))
        # path_filter called internally
        fp = write_optional_file(content=content, fp=fp)

        if fp and show:
            import webbrowser  #pragma: no cover
            webbrowser.open_new_tab(fp)  #pragma: no cover

        return fp