pywebexec 1.6.13__tar.gz → 1.6.14__tar.gz

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.
Files changed (48) hide show
  1. {pywebexec-1.6.13/pywebexec.egg-info → pywebexec-1.6.14}/PKG-INFO +1 -1
  2. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/pywebexec.py +11 -6
  3. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/version.py +2 -2
  4. {pywebexec-1.6.13 → pywebexec-1.6.14/pywebexec.egg-info}/PKG-INFO +1 -1
  5. {pywebexec-1.6.13 → pywebexec-1.6.14}/.github/workflows/python-publish.yml +0 -0
  6. {pywebexec-1.6.13 → pywebexec-1.6.14}/.gitignore +0 -0
  7. {pywebexec-1.6.13 → pywebexec-1.6.14}/LICENSE +0 -0
  8. {pywebexec-1.6.13 → pywebexec-1.6.14}/README.md +0 -0
  9. {pywebexec-1.6.13 → pywebexec-1.6.14}/pyproject.toml +0 -0
  10. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/__init__.py +0 -0
  11. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/css/Consolas NF.ttf +0 -0
  12. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/css/style.css +0 -0
  13. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/css/xterm.css +0 -0
  14. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/aborted.svg +0 -0
  15. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/copy.svg +0 -0
  16. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/copy_ok.svg +0 -0
  17. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/down-arrow.svg +0 -0
  18. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/failed.svg +0 -0
  19. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/favicon.svg +0 -0
  20. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/font-decrease.svg +0 -0
  21. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/font-increase.svg +0 -0
  22. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/norun.svg +0 -0
  23. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/pause.svg +0 -0
  24. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/popup.svg +0 -0
  25. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/resume.svg +0 -0
  26. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/running.svg +0 -0
  27. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/images/success.svg +0 -0
  28. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/commands.js +0 -0
  29. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/popup.js +0 -0
  30. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/script.js +0 -0
  31. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/LICENSE +0 -0
  32. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-canvas.js +0 -0
  33. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-canvas.js.map +0 -0
  34. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-fit.js +0 -0
  35. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-fit.js.map +0 -0
  36. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-unicode11.js +0 -0
  37. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/addon-unicode11.js.map +0 -0
  38. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/xterm.js +0 -0
  39. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/static/js/xterm/xterm.js.map +0 -0
  40. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/templates/__init__.py +0 -0
  41. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/templates/index.html +0 -0
  42. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec/templates/popup.html +0 -0
  43. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec.egg-info/SOURCES.txt +0 -0
  44. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec.egg-info/dependency_links.txt +0 -0
  45. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec.egg-info/entry_points.txt +0 -0
  46. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec.egg-info/requires.txt +0 -0
  47. {pywebexec-1.6.13 → pywebexec-1.6.14}/pywebexec.egg-info/top_level.txt +0 -0
  48. {pywebexec-1.6.13 → pywebexec-1.6.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -182,11 +182,16 @@ class PyWebExec(Application):
182
182
  return self.application
183
183
 
184
184
  def get_visible_output(line):
185
- screen = pyte.Screen(len(line)+1, 2)
186
- stream = pyte.Stream(screen)
187
- stream.feed(line)
188
- visible_line = screen.display[0]
189
- return visible_line
185
+ try:
186
+ screen = pyte.Screen(len(line)+1, 2)
187
+ stream = pyte.Stream(screen)
188
+ stream.feed(line)
189
+ visible_line = screen.display[1].strip(" ")
190
+ if visible_line:
191
+ return visible_line
192
+ return screen.display[0].strip(" ")
193
+ except:
194
+ return ""
190
195
  #38;2;66;59;165m
191
196
  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
197
 
@@ -198,7 +203,7 @@ def strip_ansi_control_chars(text):
198
203
  def decode_line(line: bytes) -> str:
199
204
  """try decode line exception on binary"""
200
205
  try:
201
- return get_visible_output(line.decode()).strip(" ")
206
+ return get_visible_output(line.decode())
202
207
  except UnicodeDecodeError:
203
208
  return ""
204
209
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.6.13'
16
- __version_tuple__ = version_tuple = (1, 6, 13)
15
+ __version__ = version = '1.6.14'
16
+ __version_tuple__ = version_tuple = (1, 6, 14)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
File without changes
File without changes
File without changes
File without changes
File without changes