Skip to main content

Causal embedding of shell commands into python code.

Project description

pshlib

Causal embedding of shell commands into python code.

Example

You can break single long bash lines into nested python like multi-line statements:

    res = psh(
    'VAR=world',
    """
        echo This is
            a multiline hello
            $VAR!
    """,
    ).output
    print(res)
    excepted = 'This is a multiline hello world!\n'
    assert excepted == res

Installation

with pip:

pip install pshlib

with poetry:

poetry add git+https://gitlab.com:ewiger/pshlib.git

License

Licensed under MIT. See LICENSE for details.

Publish

poetry publish --build

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

pshlib-0.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

pshlib-0.1.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

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