Skip to main content

Bash range expression evaluator for your cli application

Project description

# bashrange

Bash range expression evaluator for your cli application

# Install

`bash pip install bashrange `

# Use

Import and call expand_args

`python import argparse from bashrange import expand_args parser = argparse.ArgumentParser(prog="copy.py") parser.add_argument("src", nargs='+') parser.add_argument("dst") args = parser.parse_args(expand_args()) `

And you can use bash range and list expressions outiside bash shell, for example in cmd on windows

`bash python copy.py image{1..10}.jpg folder python copy.py file.txt{,.bak} `

You can test expression expansion in cmd like this

`bash python -m bashrange -v {1..10..2} `

## Author

Stanislav Doronin <mugisbrows@gmail.com>

## License

bashrange is distributed under the terms of MIT license, check LICENSE file.

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

bashrange-0.0.4.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

bashrange-0.0.4-py3-none-any.whl (16.5 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