Skip to main content

Run terminal commands 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 convert units of measurement to others. For example, You can use the "time" function to convert seconds to minutes.

import conversa
result = conversa.time(90,  From="seconds",  To="minutes") # Output will be 1.5 minutes (1.5 as a integer)
print(result)

Installation

pip install conversa

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

propar-1.0.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

propar-1.0.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file propar-1.0.1.tar.gz.

File metadata

  • Download URL: propar-1.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

Hashes for propar-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0ce90620b2b47ca1fec07a04c931f622b04e9a8371cf1a6e937bfae81dc08536
MD5 05422e8f4239ecc34a7d532f6dead2b3
BLAKE2b-256 104c6aba009f467bf7c8fd34718d1d54e9583b1004094158278380affb484dbd

See more details on using hashes here.

File details

Details for the file propar-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: propar-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for propar-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bee5e50c90ed79c375fb022284a2ed25bc13cfa524947d09bf13d141dea69d7
MD5 ab310a04683ed9ed6314e925d8c5c9fb
BLAKE2b-256 e8dd611ed58221bfde787fea11b0f5bc3004c243692150a9c500b130cf5195b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page