Skip to main content

A simple arugments parser.

Project description

A simple argument parser.

Usage

import argpar
import copy
import sys
opts = {"o": None, "g": "foo", "w": None}
flags = ["t", "u"]
posarg = {"path": "/home"}
argpar.parse(opts, copy.copy(sys.argv), flags, posarg)

Vaules in opts and posarg dictionaries are default values.

Will automaticaly print help message if a h flag is found and exit.

We recomend copying sys.argv, as arguments get removed during parsing.

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

argpar-1.2.1.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file argpar-1.2.1.tar.gz.

File metadata

  • Download URL: argpar-1.2.1.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for argpar-1.2.1.tar.gz
Algorithm Hash digest
SHA256 fad12a56c04d1f46380f7c4c05089c68cad7ab539b58c07e21934bc2d4802360
MD5 6d662853bc5c4a69f0543ad05599158c
BLAKE2b-256 dce4d7d7660a3d50dc3fac7e391946338fdff4b4df8a462229c2c4bd1de54eb8

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