multiscript-windows 1.0.0__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.
@@ -0,0 +1,69 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (c) 2026 KingTheCoder
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The GNU General Public License is a free, copyleft license for
12
+ software and other kinds of works.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ the GNU General Public License is intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users. We, the Free Software Foundation, use the
19
+ GNU General Public License for most of our software; it applies also to
20
+ any other work released this way by its authors. You can apply it to
21
+ your programs, too.
22
+
23
+ When we speak of free software, we are referring to freedom, not
24
+ price. Our General Public Licenses are designed to make sure that you
25
+ have the freedom to distribute copies of free software (and charge for
26
+ them if you wish), that you receive source code or can get it if you
27
+ want it, that you can change the software or use pieces of it in new
28
+ free programs, and that you know you can do these things.
29
+
30
+ To protect your rights, we need to prevent others from denying you
31
+ these rights or asking you to surrender the rights. Therefore, you have
32
+ certain responsibilities if you distribute copies of the software, or if
33
+ you modify it: responsibilities to respect the freedom of others.
34
+
35
+ For example, if you distribute copies of such a program, whether
36
+ gratis or for a fee, you must give the recipients all the rights that
37
+ you have. You must make sure that they, too, receive or can get the
38
+ source code. And you must show them these terms so they know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for the free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuses occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: multiscript-windows
3
+ Version: 1.0.0
4
+ Summary: A lightweight wrapper to run Batch and VBScript within Python.
5
+ Author-email: KingTheCoder <kingjd490@gmail.com>
6
+ License: GPL-3.0-only
7
+ Project-URL: Homepage, https://github.com/KingTheCoder/multiscript-windows
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.7
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+ # multiscript-windows
18
+ Multiscript is a small, open-source Python module made for executing code in other languages within Python.
19
+
20
+ ## Installation
21
+ Install multiscript with this command: `pip install multiscript-windows`.
22
+
23
+ ## Use
24
+ Multiscript is amazing for simplifying operations that python fails to expose easily, but how does it work?
25
+
26
+ The way you import multiscript into your project is through this line: `import multiscript`.
27
+
28
+ Now, you have three functions exposed to you.
29
+
30
+ Those three functions are `batchscript`, `vbscript` and `commandlist`.
31
+
32
+ The function `commandlist` gives you a list of commands that you can use in multiscript.
33
+
34
+ This includes the `batchscript` and `vbscript` commands and how to use them.
35
+
36
+ Run this command for more information.
37
+
38
+ The `batchscript` command executes batch in a string.
39
+
40
+ Example:
41
+
42
+ ```
43
+ import multiscript
44
+
45
+ batchscript(
46
+ r"""
47
+ move test.txt .\destination
48
+ del deleteme.png
49
+ echo Test Complete!
50
+ """
51
+ )
52
+
53
+ print("And we're still in python!")
54
+ ```
55
+
56
+ The `vbscript` command executes visual basic in a string.
57
+
58
+ Example:
59
+
60
+ ```
61
+ import multiscript
62
+
63
+ vbscript(
64
+ r"""
65
+ MsgBox "Hi, there!", 64 + vbOkOnly, "Hi!"
66
+ MsgBox "Goodbye!", 64 + vbOkOnly, "Bye!"
67
+ """
68
+ )
69
+
70
+ print("And we can still use more python!")
71
+ ```
72
+
73
+ ## Licensing
74
+
75
+ Licensed under the GNU General Public License v3 (GPLv3).
76
+
77
+ For more information, read the LICENSE file in the project directory.
78
+
79
+ ## Some Extra
80
+
81
+ Hey, thanks for reading all the way to the end!
82
+
83
+ This README took a long time to make.
84
+
85
+ I just wanted to give you a fun thing to try in Python.
86
+
87
+ Try this command in the Python REPL (or a script). `import this`
88
+
89
+ This gives you "The Zen of Python", a fun guide to some additional things about Python!
@@ -0,0 +1,73 @@
1
+ # multiscript-windows
2
+ Multiscript is a small, open-source Python module made for executing code in other languages within Python.
3
+
4
+ ## Installation
5
+ Install multiscript with this command: `pip install multiscript-windows`.
6
+
7
+ ## Use
8
+ Multiscript is amazing for simplifying operations that python fails to expose easily, but how does it work?
9
+
10
+ The way you import multiscript into your project is through this line: `import multiscript`.
11
+
12
+ Now, you have three functions exposed to you.
13
+
14
+ Those three functions are `batchscript`, `vbscript` and `commandlist`.
15
+
16
+ The function `commandlist` gives you a list of commands that you can use in multiscript.
17
+
18
+ This includes the `batchscript` and `vbscript` commands and how to use them.
19
+
20
+ Run this command for more information.
21
+
22
+ The `batchscript` command executes batch in a string.
23
+
24
+ Example:
25
+
26
+ ```
27
+ import multiscript
28
+
29
+ batchscript(
30
+ r"""
31
+ move test.txt .\destination
32
+ del deleteme.png
33
+ echo Test Complete!
34
+ """
35
+ )
36
+
37
+ print("And we're still in python!")
38
+ ```
39
+
40
+ The `vbscript` command executes visual basic in a string.
41
+
42
+ Example:
43
+
44
+ ```
45
+ import multiscript
46
+
47
+ vbscript(
48
+ r"""
49
+ MsgBox "Hi, there!", 64 + vbOkOnly, "Hi!"
50
+ MsgBox "Goodbye!", 64 + vbOkOnly, "Bye!"
51
+ """
52
+ )
53
+
54
+ print("And we can still use more python!")
55
+ ```
56
+
57
+ ## Licensing
58
+
59
+ Licensed under the GNU General Public License v3 (GPLv3).
60
+
61
+ For more information, read the LICENSE file in the project directory.
62
+
63
+ ## Some Extra
64
+
65
+ Hey, thanks for reading all the way to the end!
66
+
67
+ This README took a long time to make.
68
+
69
+ I just wanted to give you a fun thing to try in Python.
70
+
71
+ Try this command in the Python REPL (or a script). `import this`
72
+
73
+ This gives you "The Zen of Python", a fun guide to some additional things about Python!
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "multiscript-windows"
7
+ version = "1.0.0"
8
+ authors = [
9
+ { name="KingTheCoder", email="kingjd490@gmail.com" },
10
+ ]
11
+ description = "A lightweight wrapper to run Batch and VBScript within Python."
12
+ readme = "README.md"
13
+ license = { text = "GPL-3.0-only" }
14
+ requires-python = ">=3.7"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.13",
18
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
19
+ "Operating System :: Microsoft :: Windows",
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = "https://github.com/KingTheCoder/multiscript-windows"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ from .multiscript import batchscript, commandlist, vbscript
2
+ __all__ = ["batchscript", "commandlist", "vbscript"]
@@ -0,0 +1,41 @@
1
+ import os
2
+ import subprocess
3
+
4
+ def batchscript(scr, err=False, rcd=False):
5
+ with open("temp.bat", "w") as batfile:
6
+ batfile.write(scr)
7
+ snd = subprocess.run(["cmd.exe", "/c", "temp.bat"], capture_output=True, text=True)
8
+ rtn = snd.stdout
9
+ if err:
10
+ rtn = (rtn + "\n" + snd.stderr)
11
+ if rcd:
12
+ rtn = (rtn + "\n" + str(snd.returncode))
13
+ os.remove("temp.bat")
14
+ return rtn
15
+ def commandlist():
16
+ print(
17
+ """
18
+ -=#COMMANDS#=-
19
+ batchscript(script, showerrorcode, showreturncode)
20
+ Runs a batch script.
21
+ If not specified, showerrorcode and showreturncode will be set to False.
22
+ vbscript(script, showerrorcode, showreturncode, usewscript)
23
+ Runs a visual basic script.
24
+ If not specified, showerrorcode, showreturncode and usewscript will be set to False.
25
+ The usewscript argument controls if cscript or wscript is used to execute.
26
+ """
27
+ )
28
+ def vbscript(scr, err=False, rcd=False, wsc=False):
29
+ with open("temp.vbs", "w") as vbsfile:
30
+ vbsfile.write(scr)
31
+ if wsc:
32
+ snd = subprocess.run(["wscript.exe", "temp.vbs"], capture_output=True, text=True)
33
+ else:
34
+ snd = subprocess.run(["cscript.exe", "//Nologo", "temp.vbs"], capture_output=True, text=True)
35
+ rtn = snd.stdout
36
+ if err:
37
+ rtn = (rtn + "\n" + snd.stderr)
38
+ if rcd:
39
+ rtn = (rtn + "\n" + snd.returncode)
40
+ os.remove("temp.vbs")
41
+ return rtn
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: multiscript-windows
3
+ Version: 1.0.0
4
+ Summary: A lightweight wrapper to run Batch and VBScript within Python.
5
+ Author-email: KingTheCoder <kingjd490@gmail.com>
6
+ License: GPL-3.0-only
7
+ Project-URL: Homepage, https://github.com/KingTheCoder/multiscript-windows
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.7
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+ # multiscript-windows
18
+ Multiscript is a small, open-source Python module made for executing code in other languages within Python.
19
+
20
+ ## Installation
21
+ Install multiscript with this command: `pip install multiscript-windows`.
22
+
23
+ ## Use
24
+ Multiscript is amazing for simplifying operations that python fails to expose easily, but how does it work?
25
+
26
+ The way you import multiscript into your project is through this line: `import multiscript`.
27
+
28
+ Now, you have three functions exposed to you.
29
+
30
+ Those three functions are `batchscript`, `vbscript` and `commandlist`.
31
+
32
+ The function `commandlist` gives you a list of commands that you can use in multiscript.
33
+
34
+ This includes the `batchscript` and `vbscript` commands and how to use them.
35
+
36
+ Run this command for more information.
37
+
38
+ The `batchscript` command executes batch in a string.
39
+
40
+ Example:
41
+
42
+ ```
43
+ import multiscript
44
+
45
+ batchscript(
46
+ r"""
47
+ move test.txt .\destination
48
+ del deleteme.png
49
+ echo Test Complete!
50
+ """
51
+ )
52
+
53
+ print("And we're still in python!")
54
+ ```
55
+
56
+ The `vbscript` command executes visual basic in a string.
57
+
58
+ Example:
59
+
60
+ ```
61
+ import multiscript
62
+
63
+ vbscript(
64
+ r"""
65
+ MsgBox "Hi, there!", 64 + vbOkOnly, "Hi!"
66
+ MsgBox "Goodbye!", 64 + vbOkOnly, "Bye!"
67
+ """
68
+ )
69
+
70
+ print("And we can still use more python!")
71
+ ```
72
+
73
+ ## Licensing
74
+
75
+ Licensed under the GNU General Public License v3 (GPLv3).
76
+
77
+ For more information, read the LICENSE file in the project directory.
78
+
79
+ ## Some Extra
80
+
81
+ Hey, thanks for reading all the way to the end!
82
+
83
+ This README took a long time to make.
84
+
85
+ I just wanted to give you a fun thing to try in Python.
86
+
87
+ Try this command in the Python REPL (or a script). `import this`
88
+
89
+ This gives you "The Zen of Python", a fun guide to some additional things about Python!
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/multiscript/__init__.py
5
+ src/multiscript/multiscript.py
6
+ src/multiscript_windows.egg-info/PKG-INFO
7
+ src/multiscript_windows.egg-info/SOURCES.txt
8
+ src/multiscript_windows.egg-info/dependency_links.txt
9
+ src/multiscript_windows.egg-info/top_level.txt