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, flags, {}, copy.copy(sys.argv))
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.tar.gz
(1.8 kB
view details)
File details
Details for the file argpar-1.tar.gz
.
File metadata
- Download URL: argpar-1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c73d61706d785f9496e56092f45fc4fb0c6ea4f95cca05b09e053263b54b6bb9 |
|
MD5 | 5a2077037ca958b7a8fe2175b9bbb6c2 |
|
BLAKE2b-256 | 38056d4493c051d4434a16222cf25675da06001505fc77e8828d52b680c37f34 |