Skip to content

A simple helper to run cli commands in a less error-prone manner.

License

Notifications You must be signed in to change notification settings

tevops/pretty-popen

Repository files navigation

A helper to prettify commands



Example usage: Dict[str: List[Tuple]]

process = PrettyPopen(args={"python3 run_file.py": [
    ("--arg1", 1),
    ("--arg2", 2),
    ("--arg3", 3),
    ("--arg4", 4),
        * * * 
    ("--argN", N),
    ("--arg_clean",)]}, **kwargs)
stderr, stdout = process.communicate()

# MEANT TO REPLACE

process = Popen("python3 run_file.py --arg1 1 --arg2 2 --arg3 3 --arg4 4  * * *  --argN N --arg_clean", **kwargs)
stderr, stdout = process.communicate()


That's it.

To install run:

pip install git+https://github.com/tevops/pretty-popen.git

About

A simple helper to run cli commands in a less error-prone manner.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages