Port c++ to python easily!
Project description
Donations
It takes me a long time to make these libraries. If you would like to support my work, Then you can follow my patreon :)
https://www.patreon.com/Schkimansky
Library
This is a easy to use python library that allows you to run terminal commands easily.
import propar
result = propar.run_command('echo Hello, MG?')
print(result)
Installation
pip install propar
Documentation
There are only 2 functions:
run_command(command: str, timeout=None, get_both_output_and_errors=False, get_return_code=False)
run_commands(commands_array: list[str], timeout=None, get_both_output_and_errors=False, get_return_code=False)
Run_command takes a command as a string and then runs it. The return value of the function depends on the parameters. For example, In this case the return value will be the text that you get when you run the command manually in the terminal.
result = run_command("mkdir NewFolder") # If this command gets a error, it will return the error. However if theres no error, Then it will just return the text you get when you execute that command manually.
However, you can put a timeout parameter to stop the function once it takes too long (defined in seconds)
Also, theres the run_commands function. Its the same as run_command but this time it runs multiple commands.
Thats pretty much all, This can be used as a alternative to CMake. And is more powerfull, easier, extensible, simpler, reliable
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
File details
Details for the file vialin-0.0.1.tar.gz
.
File metadata
- Download URL: vialin-0.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b0ab162d5e7a0aec378d53f3d8ab46c090e2c516a4095bff79478800e27aa28 |
|
MD5 | 5c01c34aa84f2566639050c58b1ac29a |
|
BLAKE2b-256 | e019dfa55abab0156668f4ed89f2812acc6740f675d59d14de281c39323fa38a |
File details
Details for the file vialin-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: vialin-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc3791a70ddf8400aa964cdad77ceb6018214075cca9c3268b8ae76b47e7477 |
|
MD5 | 884fa5bb9419b43f72392a7eaaeeede9 |
|
BLAKE2b-256 | 26a7a64b17cf850b5f299ed8ee4026249ba69c1f90b9cf8db70966762572155f |