tinyssg 0.0.5__py3-none-any.whl → 0.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tinyssg/__main__.py +12 -4
- {tinyssg-0.0.5.dist-info → tinyssg-0.0.8.dist-info}/METADATA +1 -1
- tinyssg-0.0.8.dist-info/RECORD +5 -0
- tinyssg-0.0.5.dist-info/RECORD +0 -5
- {tinyssg-0.0.5.dist-info → tinyssg-0.0.8.dist-info}/WHEEL +0 -0
- {tinyssg-0.0.5.dist-info → tinyssg-0.0.8.dist-info}/top_level.txt +0 -0
    
        tinyssg/__main__.py
    CHANGED
    
    | @@ -103,7 +103,8 @@ class TinySSGUtility: | |
| 103 103 |  | 
| 104 104 | 
             
                    print(message)
         | 
| 105 105 |  | 
| 106 | 
            -
                 | 
| 106 | 
            +
                @classmethod
         | 
| 107 | 
            +
                def error_print(cls, message: str) -> None:
         | 
| 107 108 | 
             
                    """
         | 
| 108 109 | 
             
                    Output error message
         | 
| 109 110 | 
             
                    """
         | 
| @@ -482,7 +483,7 @@ class TinySSGDebug: | |
| 482 483 | 
             
                    """
         | 
| 483 484 | 
             
                    Output the server stop message
         | 
| 484 485 | 
             
                    """
         | 
| 485 | 
            -
                    TinySSGUtility.error_print( | 
| 486 | 
            +
                    TinySSGUtility.error_print(f"Server return code:{process.poll()}")
         | 
| 486 487 | 
             
                    TinySSGUtility.error_print('Server Output:\n')
         | 
| 487 488 | 
             
                    TinySSGUtility.error_print(process.stdout.read() if process.stdout else '')
         | 
| 488 489 | 
             
                    TinySSGUtility.error_print(process.stderr.read() if process.stderr else '')
         | 
| @@ -566,13 +567,20 @@ class TinySSGLauncher: | |
| 566 567 | 
             
                    """
         | 
| 567 568 | 
             
                    url = f"http://localhost:{args['port']}/{args['output']}/"
         | 
| 568 569 |  | 
| 570 | 
            +
                    is_jupyter = False
         | 
| 571 | 
            +
             | 
| 569 572 | 
             
                    try:
         | 
| 570 573 | 
             
                        from IPython import get_ipython  # type: ignore
         | 
| 571 574 | 
             
                        env = get_ipython().__class__.__name__
         | 
| 572 575 | 
             
                        if env == 'ZMQInteractiveShell':
         | 
| 573 | 
            -
                             | 
| 574 | 
            -
                            display.display(display.IFrame(url, width=args['jwidth'], height=args['jheight']))
         | 
| 576 | 
            +
                            is_jupyter = True
         | 
| 575 577 | 
             
                    except:  # noqa: E722
         | 
| 578 | 
            +
                        pass
         | 
| 579 | 
            +
             | 
| 580 | 
            +
                    if is_jupyter:
         | 
| 581 | 
            +
                        from IPython import display
         | 
| 582 | 
            +
                        display.display(display.IFrame(url, width=args['jwidth'], height=args['jheight']))
         | 
| 583 | 
            +
                    else:
         | 
| 576 584 | 
             
                        webbrowser.open(url)
         | 
| 577 585 |  | 
| 578 586 | 
             
                @classmethod
         | 
| @@ -0,0 +1,5 @@ | |
| 1 | 
            +
            tinyssg/__main__.py,sha256=sueS07zBArMNom52meUSmHkO8TNdNUxEKaMfxCkMSIY,27260
         | 
| 2 | 
            +
            tinyssg-0.0.8.dist-info/METADATA,sha256=T4LpZwNNgfrKtRLv3-_JBnOeIyQ1f583doOv6GwoLog,5068
         | 
| 3 | 
            +
            tinyssg-0.0.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
         | 
| 4 | 
            +
            tinyssg-0.0.8.dist-info/top_level.txt,sha256=8u1XtPYCatbklb6u3NbJbFUbwA8nDKZ6cY3FScGwJDQ,8
         | 
| 5 | 
            +
            tinyssg-0.0.8.dist-info/RECORD,,
         | 
    
        tinyssg-0.0.5.dist-info/RECORD
    DELETED
    
    | @@ -1,5 +0,0 @@ | |
| 1 | 
            -
            tinyssg/__main__.py,sha256=ahz5C5AR4RRTw5Cv5y0AUI7GtrpRtR9p6fL9Wesvfmk,27125
         | 
| 2 | 
            -
            tinyssg-0.0.5.dist-info/METADATA,sha256=8FgJojd0aXYnXCkPScTCyelAXWX-TNTfk3dSlWxuEck,5068
         | 
| 3 | 
            -
            tinyssg-0.0.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
         | 
| 4 | 
            -
            tinyssg-0.0.5.dist-info/top_level.txt,sha256=8u1XtPYCatbklb6u3NbJbFUbwA8nDKZ6cY3FScGwJDQ,8
         | 
| 5 | 
            -
            tinyssg-0.0.5.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
| 
            File without changes
         |