A lightweight wrapper to run Batch and VBScript within Python.
Project description
multiscript-windows
Multiscript is a small, open-source Python module made for executing code in other languages within Python.
Installation
Install multiscript with this command: pip install multiscript-windows.
Use
Multiscript is amazing for simplifying operations that python fails to expose easily, but how does it work?
The way you import multiscript into your project is through this line: import multiscript.
Now, you have four functions exposed to you.
Those four functions are batchscript, vbscript, javascript and commandlist.
The function commandlist gives you a list of functions that you can use in multiscript.
This includes all other commands and how to use them.
Run this function for more information.
The batchscript function executes batch in a string.
Example:
import multiscript
prn = multiscript.batchscript(
r"""
move test.txt .\destination
del deleteme.png
echo Test Complete!
"""
)
print(prn)
print("And we're still in python!")
The vbscript function executes visual basic in a string.
Example:
import multiscript
multiscript.vbscript(
r"""
MsgBox "Hi, there!", 64 + vbOkOnly, "Hi!"
MsgBox "Goodbye!", 64 + vbOkOnly, "Bye!"
"""
)
print("And we can still use more python!")
The javascript function executes javascript in a string.
Example:
import multiscript
print(
multiscript.javascript(
"""
WScript.Echo("Hello, World!")
"""
)
)
print("All within python!")
Licensing
Licensed under the GNU General Public License v3 (GPLv3).
For more information, read the LICENSE file in the project directory.
Versions
All of the versions of multiscript.
1.0.1
Fixed a bug where enabling showreturncode for the vbscript function would cause a TypeError.
1.0.2
Fixed a bug where running two of the same function at the same time would overwrite temp file A with temp file B.
1.0.3
Added the javascript function.
1.0.4
Fixed a bug in __init__.py where it would not import nor export the javascript function.
1.0.5
Fixed unclear wording in README.md.
1.0.6
Fixed examples in README.md.
Some Extra
Hey, thanks for reading all the way to the end!
This README took a long time to make.
I just wanted to give you a fun thing to try in Python.
Try this command in the Python REPL (or a script). import this
This gives you "The Zen of Python", a fun guide to some additional things about Python!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multiscript_windows-1.0.7.tar.gz.
File metadata
- Download URL: multiscript_windows-1.0.7.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a61e337449367fbab960750a8c4fccaddd8322c8788215957c751e74a9f55fa0
|
|
| MD5 |
39726fb745b7e9fb54d1c74a8e5d9d92
|
|
| BLAKE2b-256 |
665d9006044e76de3cba48e28dd87574ab843f25de722d7d9a0beb84674041f0
|
File details
Details for the file multiscript_windows-1.0.7-py3-none-any.whl.
File metadata
- Download URL: multiscript_windows-1.0.7-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48ab78274a0a2f8645bf8dc6b4bde92e00e5fea064b1dffee648388d8873907
|
|
| MD5 |
12a2b2824707a922275705917aadac58
|
|
| BLAKE2b-256 |
aebb8586db6ed523ab013f3553a6d80f2fc21166a8f27411071a8b54a4ae1828
|