multiscript-windows 1.0.1__tar.gz → 1.0.2__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.
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/PKG-INFO +5 -1
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/README.md +4 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/pyproject.toml +1 -1
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript/multiscript.py +13 -9
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/PKG-INFO +5 -1
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/LICENSE +0 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/setup.cfg +0 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript/__init__.py +0 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/SOURCES.txt +0 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/dependency_links.txt +0 -0
- {multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multiscript-windows
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A lightweight wrapper to run Batch and VBScript within Python.
|
|
5
5
|
Author-email: KingTheCoder <kingjd490@gmail.com>
|
|
6
6
|
License: GPL-3.0-only
|
|
@@ -84,6 +84,10 @@ All of the versions of multiscript.
|
|
|
84
84
|
|
|
85
85
|
Fixed a bug where enabling `showreturncode` for the `vbscript` function would cause a `TypeError`.
|
|
86
86
|
|
|
87
|
+
## 1.0.2
|
|
88
|
+
|
|
89
|
+
Fixed a bug where running two of the same script at the same time would overwrite temp file A with temp file B.
|
|
90
|
+
|
|
87
91
|
## Some Extra
|
|
88
92
|
|
|
89
93
|
Hey, thanks for reading all the way to the end!
|
|
@@ -68,6 +68,10 @@ All of the versions of multiscript.
|
|
|
68
68
|
|
|
69
69
|
Fixed a bug where enabling `showreturncode` for the `vbscript` function would cause a `TypeError`.
|
|
70
70
|
|
|
71
|
+
## 1.0.2
|
|
72
|
+
|
|
73
|
+
Fixed a bug where running two of the same script at the same time would overwrite temp file A with temp file B.
|
|
74
|
+
|
|
71
75
|
## Some Extra
|
|
72
76
|
|
|
73
77
|
Hey, thanks for reading all the way to the end!
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
1
|
+
import os, subprocess, uuid
|
|
2
|
+
|
|
3
|
+
def gentempname(ext):
|
|
4
|
+
return "tmp_" + uuid.uuid4().hex[:16] + ext
|
|
3
5
|
|
|
4
6
|
def batchscript(scr, err=False, rcd=False):
|
|
5
|
-
|
|
7
|
+
fname = gentempname(".bat")
|
|
8
|
+
with open(fname, "w") as batfile:
|
|
6
9
|
batfile.write(scr)
|
|
7
|
-
snd = subprocess.run(["cmd.exe", "/c",
|
|
10
|
+
snd = subprocess.run(["cmd.exe", "/c", fname], capture_output=True, text=True)
|
|
8
11
|
rtn = snd.stdout
|
|
9
12
|
if err:
|
|
10
13
|
rtn = (rtn + "\n" + snd.stderr)
|
|
11
14
|
if rcd:
|
|
12
15
|
rtn = (rtn + "\n" + str(snd.returncode))
|
|
13
|
-
os.remove(
|
|
16
|
+
os.remove(fname)
|
|
14
17
|
return rtn
|
|
15
18
|
def commandlist():
|
|
16
19
|
print(
|
|
@@ -26,16 +29,17 @@ The usewscript argument controls if cscript or wscript is used to execute.
|
|
|
26
29
|
"""
|
|
27
30
|
)
|
|
28
31
|
def vbscript(scr, err=False, rcd=False, wsc=False):
|
|
29
|
-
|
|
32
|
+
fname = gentempname(".vbs")
|
|
33
|
+
with open(fname, "w") as vbsfile:
|
|
30
34
|
vbsfile.write(scr)
|
|
31
35
|
if wsc:
|
|
32
|
-
snd = subprocess.run(["wscript.exe",
|
|
36
|
+
snd = subprocess.run(["wscript.exe", fname], capture_output=True, text=True)
|
|
33
37
|
else:
|
|
34
|
-
snd = subprocess.run(["cscript.exe", "//Nologo",
|
|
38
|
+
snd = subprocess.run(["cscript.exe", "//Nologo", fname], capture_output=True, text=True)
|
|
35
39
|
rtn = snd.stdout
|
|
36
40
|
if err:
|
|
37
41
|
rtn = (rtn + "\n" + snd.stderr)
|
|
38
42
|
if rcd:
|
|
39
43
|
rtn = (rtn + "\n" + str(snd.returncode))
|
|
40
|
-
os.remove(
|
|
44
|
+
os.remove(fname)
|
|
41
45
|
return rtn
|
{multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multiscript-windows
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A lightweight wrapper to run Batch and VBScript within Python.
|
|
5
5
|
Author-email: KingTheCoder <kingjd490@gmail.com>
|
|
6
6
|
License: GPL-3.0-only
|
|
@@ -84,6 +84,10 @@ All of the versions of multiscript.
|
|
|
84
84
|
|
|
85
85
|
Fixed a bug where enabling `showreturncode` for the `vbscript` function would cause a `TypeError`.
|
|
86
86
|
|
|
87
|
+
## 1.0.2
|
|
88
|
+
|
|
89
|
+
Fixed a bug where running two of the same script at the same time would overwrite temp file A with temp file B.
|
|
90
|
+
|
|
87
91
|
## Some Extra
|
|
88
92
|
|
|
89
93
|
Hey, thanks for reading all the way to the end!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiscript_windows-1.0.1 → multiscript_windows-1.0.2}/src/multiscript_windows.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|