pywebexec 1.6.13__py3-none-any.whl → 1.6.15__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.
- pywebexec/pywebexec.py +8 -6
- pywebexec/version.py +2 -2
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/METADATA +1 -1
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/RECORD +8 -8
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/LICENSE +0 -0
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/WHEEL +0 -0
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.6.13.dist-info → pywebexec-1.6.15.dist-info}/top_level.txt +0 -0
pywebexec/pywebexec.py
CHANGED
@@ -182,11 +182,13 @@ class PyWebExec(Application):
|
|
182
182
|
return self.application
|
183
183
|
|
184
184
|
def get_visible_output(line):
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
185
|
+
try:
|
186
|
+
screen = pyte.Screen(len(line)+1, 1)
|
187
|
+
stream = pyte.Stream(screen)
|
188
|
+
stream.feed(line)
|
189
|
+
return screen.display[0].strip(" ")
|
190
|
+
except:
|
191
|
+
return ""
|
190
192
|
#38;2;66;59;165m
|
191
193
|
ANSI_ESCAPE = re.compile(br'(?:\x1B[@-Z\\-_]|\x1B([(]B|>)|(?:\x1B\[|\x9B)[0-?]*[ -/]*[@-~]|\x1B\[([0-9]{1,2};){0,4}[0-9]{1,3}[m|K]|\x1B\[[0-9;]*[mGKHF]|[\x00-\x1F\x7F])')
|
192
194
|
|
@@ -198,7 +200,7 @@ def strip_ansi_control_chars(text):
|
|
198
200
|
def decode_line(line: bytes) -> str:
|
199
201
|
"""try decode line exception on binary"""
|
200
202
|
try:
|
201
|
-
return get_visible_output(line.decode())
|
203
|
+
return get_visible_output(line.decode())
|
202
204
|
except UnicodeDecodeError:
|
203
205
|
return ""
|
204
206
|
|
pywebexec/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
|
2
|
-
pywebexec/pywebexec.py,sha256=
|
3
|
-
pywebexec/version.py,sha256=
|
2
|
+
pywebexec/pywebexec.py,sha256=mABzDShwZEykXOLg0C8xMXFT1kG-9uOxl_FdlD6MXvI,32541
|
3
|
+
pywebexec/version.py,sha256=G6p4cF-LZDRxAX98giKjw_I7RSw9Ya1xCzihpDrYDsA,413
|
4
4
|
pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
|
5
5
|
pywebexec/static/css/style.css,sha256=MJHUBpjWL4sLxM7a7DxypmPKaFJQbmA_ESNXsbLviNI,8201
|
6
6
|
pywebexec/static/css/xterm.css,sha256=uo5phWaUiJgcz0DAzv46uoByLLbJLeetYosL1xf68rY,5559
|
@@ -33,9 +33,9 @@ pywebexec/static/js/xterm/xterm.js.map,sha256=Y7O2Pb-fIS7Z8AC1D5s04_aiW_Jf1f4mCf
|
|
33
33
|
pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
pywebexec/templates/index.html,sha256=5h8kLyzAhbvUDU9sEwrGIvD6FxAMcDZLXlN-ldlO8KU,2880
|
35
35
|
pywebexec/templates/popup.html,sha256=3ZqQcE9mYs-RXv0Lfb24zntOlvR137ZYI9mtCZNVAo0,1407
|
36
|
-
pywebexec-1.6.
|
37
|
-
pywebexec-1.6.
|
38
|
-
pywebexec-1.6.
|
39
|
-
pywebexec-1.6.
|
40
|
-
pywebexec-1.6.
|
41
|
-
pywebexec-1.6.
|
36
|
+
pywebexec-1.6.15.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
37
|
+
pywebexec-1.6.15.dist-info/METADATA,sha256=6EUhbgPlcOPc8ccnsMYgcboAvFqz-CSTdNy8qgvOw0E,8001
|
38
|
+
pywebexec-1.6.15.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
39
|
+
pywebexec-1.6.15.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
40
|
+
pywebexec-1.6.15.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
41
|
+
pywebexec-1.6.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|