tinyssg 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tinyssg/__main__.py +11 -3
- {tinyssg-0.0.6.dist-info → tinyssg-0.0.8.dist-info}/METADATA +1 -1
- tinyssg-0.0.8.dist-info/RECORD +5 -0
- tinyssg-0.0.6.dist-info/RECORD +0 -5
- {tinyssg-0.0.6.dist-info → tinyssg-0.0.8.dist-info}/WHEEL +0 -0
- {tinyssg-0.0.6.dist-info → tinyssg-0.0.8.dist-info}/top_level.txt +0 -0
tinyssg/__main__.py
CHANGED
@@ -103,6 +103,7 @@ class TinySSGUtility:
|
|
103
103
|
|
104
104
|
print(message)
|
105
105
|
|
106
|
+
@classmethod
|
106
107
|
def error_print(cls, message: str) -> None:
|
107
108
|
"""
|
108
109
|
Output error message
|
@@ -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.6.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
tinyssg/__main__.py,sha256=7tBWchAxMWd_3YxUcbSxCG0dYF9JQ7UeKVY9_yO7Apc,27125
|
2
|
-
tinyssg-0.0.6.dist-info/METADATA,sha256=KBOjK201bmyqmG9K5IDgzO0Xj617C3S4z4qDCrwRnB4,5068
|
3
|
-
tinyssg-0.0.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
4
|
-
tinyssg-0.0.6.dist-info/top_level.txt,sha256=8u1XtPYCatbklb6u3NbJbFUbwA8nDKZ6cY3FScGwJDQ,8
|
5
|
-
tinyssg-0.0.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|