over/over/template.py
Martinez b30cab6926 implemented a global exception handler for over.app.Main that uses introspection and docstrings to create human-friendly stack traces
implemented most of the command line parser
expanded ANSI color palette
added over.text.char_in_str
over.text.Output removes colors if the output stream is not a tty
minor fixes and improvements
2016-05-15 22:07:38 +02:00

34 lines
856 B
Python

#! /usr/bin/env python3
# encoding: utf-8
# --------------------------------------------------
# Library imports
import over
prefix = over.text.prefix
# --------------------------------------------------
# Local imports
import version
# --------------------------------------------------
# Exceptions
class ConfigurationError(Exception):
pass
# --------------------------------------------------
# Functions
# --------------------------------------------------
# Classes
# --------------------------------------------------
if __name__ == "__main__":
main = over.app.Main("short-name", "Human Readable Name", version.str, "LICENSE", use_cfg_file=False)
main.add_option("option", "type", "default", "Description.", short_name="s")
main.add_help("Description", ["What it does.", "Another paragraph."])
main.enable_help("h")
main.parse()
...