Skip to main content

Argdirective is a python module to detect the first command line argument as subcommand.

Project description

The argdirective project

Argdirective is a simple module which takes the first argument passed to your python script as subcommand and tries to find a directive module based on the basename of the script.

Example: script.py subcommand --arg1 --arg2

Consider the following module:

site-packages
│   ...
│
└───configmount
│   │   mount

as well as the following executable script /bin/configmount

#!/bin/python

import argdirective

if __name__ == "__main__":
	argdirective.generator.run()

If you run configmount mount --root /etc /mnt/configmount in your terminal argdirective will lookup the configmount package and redirect the arguments to the module mount. See the configmount project for more details.

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

argdirective-0.0.13rc1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file argdirective-0.0.13rc1.tar.gz.

File metadata

  • Download URL: argdirective-0.0.13rc1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for argdirective-0.0.13rc1.tar.gz
Algorithm Hash digest
SHA256 84e27edc3582230c564054c684cc51087b4aa6946f04d180380c5324e5994554
MD5 0e4b7943e00085f8902839de69633644
BLAKE2b-256 b3374aaf387d6b7ec998b55599d9c0168a4d84ee9555b7c3b5bb898cb8c5d452

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