Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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: subcommand --arg1 --arg2

Consider the following module:

│   ...
│   │   mount

as well as the following executable script /bin/configmount


import argdirective

if __name__ == "__main__":

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.

Files for argdirective, version 0.0.13rc1
Filename, size File type Python version Upload date Hashes
Filename, size argdirective-0.0.13rc1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page