multiscript-windows 1.0.6__tar.gz → 1.0.8__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.6 → multiscript_windows-1.0.8}/PKG-INFO +10 -2
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/README.md +8 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/pyproject.toml +2 -2
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript/multiscript.py +11 -28
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/PKG-INFO +10 -2
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/LICENSE +0 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/setup.cfg +0 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript/__init__.py +0 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/SOURCES.txt +0 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/dependency_links.txt +0 -0
- {multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multiscript-windows
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
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
|
|
7
|
-
Project-URL: Homepage, https://
|
|
7
|
+
Project-URL: Homepage, https://github.com/KingTheCoder314/multiscript-windows
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
10
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
@@ -124,6 +124,14 @@ Fixed unclear wording in `README.md`.
|
|
|
124
124
|
|
|
125
125
|
Fixed examples in `README.md`.
|
|
126
126
|
|
|
127
|
+
## 1.0.7
|
|
128
|
+
|
|
129
|
+
Changed homepage to https://github.com/KingTheCoder314/multiscript-windows.
|
|
130
|
+
|
|
131
|
+
## 1.0.8
|
|
132
|
+
|
|
133
|
+
Changed `multiscript.py` to use one template for script functions.
|
|
134
|
+
|
|
127
135
|
## Some Extra
|
|
128
136
|
|
|
129
137
|
Hey, thanks for reading all the way to the end!
|
|
@@ -108,6 +108,14 @@ Fixed unclear wording in `README.md`.
|
|
|
108
108
|
|
|
109
109
|
Fixed examples in `README.md`.
|
|
110
110
|
|
|
111
|
+
## 1.0.7
|
|
112
|
+
|
|
113
|
+
Changed homepage to https://github.com/KingTheCoder314/multiscript-windows.
|
|
114
|
+
|
|
115
|
+
## 1.0.8
|
|
116
|
+
|
|
117
|
+
Changed `multiscript.py` to use one template for script functions.
|
|
118
|
+
|
|
111
119
|
## Some Extra
|
|
112
120
|
|
|
113
121
|
Hey, thanks for reading all the way to the end!
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "multiscript-windows"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.8"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="KingTheCoder", email="kingjd490@gmail.com" },
|
|
10
10
|
]
|
|
@@ -20,4 +20,4 @@ classifiers = [
|
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
[project.urls]
|
|
23
|
-
Homepage = "https://
|
|
23
|
+
Homepage = "https://github.com/KingTheCoder314/multiscript-windows"
|
|
@@ -2,12 +2,12 @@ import os, subprocess, uuid
|
|
|
2
2
|
|
|
3
3
|
def gentempname(ext):
|
|
4
4
|
return "tmp_" + uuid.uuid4().hex[:16] + ext
|
|
5
|
-
|
|
6
|
-
def
|
|
7
|
-
fname = gentempname(
|
|
5
|
+
|
|
6
|
+
def scriptexec(scr, err, rcd, ext, cmd):
|
|
7
|
+
fname = gentempname(ext)
|
|
8
8
|
with open(fname, "w") as batfile:
|
|
9
9
|
batfile.write(scr)
|
|
10
|
-
snd = subprocess.run(
|
|
10
|
+
snd = subprocess.run(cmd + [fname], capture_output=True, text=True)
|
|
11
11
|
rtn = snd.stdout
|
|
12
12
|
if err:
|
|
13
13
|
rtn = (rtn + "\n" + snd.stderr)
|
|
@@ -15,6 +15,9 @@ def batchscript(scr, err=False, rcd=False):
|
|
|
15
15
|
rtn = (rtn + "\n" + str(snd.returncode))
|
|
16
16
|
os.remove(fname)
|
|
17
17
|
return rtn
|
|
18
|
+
|
|
19
|
+
def batchscript(scr, err=False, rcd=False):
|
|
20
|
+
return scriptexec(scr, err, rcd, ".bat", ["cmd.exe", "/c",])
|
|
18
21
|
def commandlist():
|
|
19
22
|
print(
|
|
20
23
|
"""
|
|
@@ -33,33 +36,13 @@ The usewscript argument controls if cscript or wscript is used to execute.
|
|
|
33
36
|
"""
|
|
34
37
|
)
|
|
35
38
|
def vbscript(scr, err=False, rcd=False, wsc=False):
|
|
36
|
-
fname = gentempname(".vbs")
|
|
37
|
-
with open(fname, "w") as vbsfile:
|
|
38
|
-
vbsfile.write(scr)
|
|
39
39
|
if wsc:
|
|
40
|
-
|
|
40
|
+
return scriptexec(scr, err, rcd, ".vbs", ["wscript.exe"])
|
|
41
41
|
else:
|
|
42
|
-
|
|
43
|
-
rtn = snd.stdout
|
|
44
|
-
if err:
|
|
45
|
-
rtn = (rtn + "\n" + snd.stderr)
|
|
46
|
-
if rcd:
|
|
47
|
-
rtn = (rtn + "\n" + str(snd.returncode))
|
|
48
|
-
os.remove(fname)
|
|
49
|
-
return rtn
|
|
42
|
+
return scriptexec(scr, err, rcd, ".vbs", ["cscript.exe", "//Nologo"])
|
|
50
43
|
def javascript(scr, err=False, rcd=False, wsc=False):
|
|
51
|
-
fname = gentempname(".js")
|
|
52
|
-
with open(fname, "w") as jsfile:
|
|
53
|
-
jsfile.write(scr)
|
|
54
44
|
if wsc:
|
|
55
|
-
|
|
45
|
+
return scriptexec(scr, err, rcd, ".js", ["wscript.exe", "//E:jscript"])
|
|
56
46
|
else:
|
|
57
|
-
|
|
58
|
-
rtn = snd.stdout
|
|
59
|
-
if err:
|
|
60
|
-
rtn = rtn + "\n" + snd.stderr
|
|
61
|
-
if rcd:
|
|
62
|
-
rtn = rtn + "\n" + str(snd.returncode)
|
|
63
|
-
os.remove(fname)
|
|
64
|
-
return rtn
|
|
47
|
+
return scriptexec(scr, err, rcd, ".js", ["cscript.exe", "//Nologo", "//E:jscript"])
|
|
65
48
|
|
{multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/PKG-INFO
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multiscript-windows
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
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
|
|
7
|
-
Project-URL: Homepage, https://
|
|
7
|
+
Project-URL: Homepage, https://github.com/KingTheCoder314/multiscript-windows
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
10
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
@@ -124,6 +124,14 @@ Fixed unclear wording in `README.md`.
|
|
|
124
124
|
|
|
125
125
|
Fixed examples in `README.md`.
|
|
126
126
|
|
|
127
|
+
## 1.0.7
|
|
128
|
+
|
|
129
|
+
Changed homepage to https://github.com/KingTheCoder314/multiscript-windows.
|
|
130
|
+
|
|
131
|
+
## 1.0.8
|
|
132
|
+
|
|
133
|
+
Changed `multiscript.py` to use one template for script functions.
|
|
134
|
+
|
|
127
135
|
## Some Extra
|
|
128
136
|
|
|
129
137
|
Hey, thanks for reading all the way to the end!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiscript_windows-1.0.6 → multiscript_windows-1.0.8}/src/multiscript_windows.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|