havocesp / cm

Configuration Magic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Commandline Magic

This module will present simplest mechanism for working with command line options and arguments.

Example of the usage bellow:

import cm
from cm.options.path import base
from cm.options.db import port, name


port.type = int
port.default = 10
port.help = "Lolwat"
base.help = "Base path"

if __name__ == '__main__':
    cm.parse_command_line()

and try to run it $ python test.py --help

List of available program options:
Group "db"
    --db-port       Lolwat [default: "10"]
    --db-name


Group "path"
    --path-base     Base path

About

Configuration Magic

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%