pywebexec 2.1.7__py3-none-any.whl → 2.1.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.
- pywebexec/pywebexec.py +7 -3
- pywebexec/version.py +2 -2
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/METADATA +1 -1
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/RECORD +8 -8
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/LICENSE +0 -0
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/WHEEL +0 -0
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/entry_points.txt +0 -0
- {pywebexec-2.1.7.dist-info → pywebexec-2.1.8.dist-info}/top_level.txt +0 -0
pywebexec/pywebexec.py
CHANGED
@@ -358,6 +358,8 @@ def parseargs():
|
|
358
358
|
parser.add_argument("-k", "--key", type=str, help="Path to https certificate key")
|
359
359
|
parser.add_argument("-g", "--gencert", action="store_true", help="https server self signed cert")
|
360
360
|
parser.add_argument("-T", "--tokenurl", action="store_true", help="generate safe url to access")
|
361
|
+
parser.add_argument("-C", "--cols", type=int, default=tty_cols, help="terminal columns")
|
362
|
+
parser.add_argument("-R", "--rows", type=int, default=tty_rows, help="terminal rows")
|
361
363
|
parser.add_argument("action", nargs="?", help="daemon action start/stop/restart/status/shareterm/term",
|
362
364
|
choices=["start","stop","restart","status","shareterm", "term", "run", "run-para"])
|
363
365
|
parser.add_argument("command", nargs="*", help="command to run")
|
@@ -385,7 +387,7 @@ def parseargs():
|
|
385
387
|
params = args.command[1:]
|
386
388
|
command_id = term_command_id
|
387
389
|
print("Command:", command_id, flush=True)
|
388
|
-
exit_code = run_command("localhost", args.user, command, params, command_id,
|
390
|
+
exit_code = run_command("localhost", args.user, command, params, command_id, args.rows, args.cols)
|
389
391
|
sys.exit(exit_code)
|
390
392
|
elif args.action == "run-para":
|
391
393
|
runpara = shutil.which("run-para")
|
@@ -400,7 +402,8 @@ def parseargs():
|
|
400
402
|
sys.exit(1)
|
401
403
|
runparams = args.command[0:commandindex]
|
402
404
|
command = args.command[commandindex+1:]
|
403
|
-
result = subprocess.run([runpara, '-n', *runparams, "--", sys.argv[0], "-d", args.dir, "
|
405
|
+
result = subprocess.run([runpara, '-n', *runparams, "--", sys.argv[0], "-d", args.dir, "-u", args.user,
|
406
|
+
"-C", str(args.cols), "-R", str(args.rows), "--", "run", *command], bufsize=0)
|
404
407
|
sys.exit(result.returncode)
|
405
408
|
|
406
409
|
(hostname, ip) = host_ip.get_host_ip(args.listen)
|
@@ -906,7 +909,8 @@ def run_dynamic_command(cmd):
|
|
906
909
|
})
|
907
910
|
Path(get_output_file_path(command_id)).touch()
|
908
911
|
if batch_values:
|
909
|
-
params = ["-n", "-p", str(parallel), "-D", str(delay), "-P", *batch_values, '--',
|
912
|
+
params = ["-n", "-p", str(parallel), "-D", str(delay), "-P", *batch_values, '--',
|
913
|
+
sys.argv[0], "-d", ".", "-u", user, "-C", str(cols), "-R", str(rows), "--", "run", cmd_path, *params]
|
910
914
|
cmd_path = shutil.which("run-para")
|
911
915
|
thread = threading.Thread(target=run_command, args=(request.remote_addr, user, cmd_path, params, command_id, rows, cols))
|
912
916
|
thread.start()
|
pywebexec/version.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
|
2
2
|
pywebexec/host_ip.py,sha256=Ud_HTflWVQ8789aoQ2RZdT1wGI-ccvrwSWGz_c7T3TI,1241
|
3
|
-
pywebexec/pywebexec.py,sha256=
|
3
|
+
pywebexec/pywebexec.py,sha256=6xLQml4foHbjLIihLye0cQgMdyyEJQrPUY-rMsPHiSw,44956
|
4
4
|
pywebexec/swagger.yaml,sha256=zP_Nz69vZx0iwbKTwiQgSs8rJRUTiGKRyIkWzMPANOE,6688
|
5
|
-
pywebexec/version.py,sha256=
|
5
|
+
pywebexec/version.py,sha256=JNwYT7L17W6XA8Q9TFeLnVI0FvK7eOV1TLduK2unwJc,511
|
6
6
|
pywebexec/static/css/form.css,sha256=zwNOJgmaxS0_1CZxH0ZgvwkLUr2FLAHrkvzsNvIY3NQ,4663
|
7
7
|
pywebexec/static/css/markdown.css,sha256=3RzUnpVBdF6cQuB_NXV7hMTc0quYU8sfyuZcpsREj6A,1939
|
8
8
|
pywebexec/static/css/style.css,sha256=ynccbEDzK07rurLm-UirUs5j_hVfXlIgaHeUIq9WvA0,9969
|
@@ -66,9 +66,9 @@ pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
66
66
|
pywebexec/templates/index.html,sha256=KeNLBH9PN_ZuGhzwrjvRTj2oBtbINv_SbwGQpOahNWo,3820
|
67
67
|
pywebexec/templates/popup.html,sha256=3kpMccKD_OLLhJ4Y9KRw6Ny8wQWjVaRrUfV9y5-bDiQ,1580
|
68
68
|
pywebexec/templates/swagger_ui.html,sha256=9ngyldkyEdLonBjl97mbIZUlVk-jxwcHrvFzMSrveyU,1067
|
69
|
-
pywebexec-2.1.
|
70
|
-
pywebexec-2.1.
|
71
|
-
pywebexec-2.1.
|
72
|
-
pywebexec-2.1.
|
73
|
-
pywebexec-2.1.
|
74
|
-
pywebexec-2.1.
|
69
|
+
pywebexec-2.1.8.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
70
|
+
pywebexec-2.1.8.dist-info/METADATA,sha256=5NKXl1UaXGMi5hc9HF2giiX809nqrKVd70yTK9g39nU,12776
|
71
|
+
pywebexec-2.1.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
72
|
+
pywebexec-2.1.8.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
73
|
+
pywebexec-2.1.8.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
74
|
+
pywebexec-2.1.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|