1#!/usr/bin/env python3
2
3from gen_arg import *
4from gen_print import *
5from gen_valid import *
6
7parser = argparse.ArgumentParser(
8    usage="%(prog)s [OPTIONS]",
9    description="%(prog)s will...",
10    formatter_class=argparse.ArgumentDefaultsHelpFormatter,
11    prefix_chars="-+",
12)
13
14parser.add_argument("--whatever", default="", help="bla, bla.")
15
16# Populate stock_list with options we want.
17stock_list = [("test_mode", 0), ("quiet", 0), ("debug", 0)]
18
19
20def exit_function():
21    r"""
22    Execute whenever the program ends normally or with the signals that we catch (i.e. TERM, INT).  This
23    function will be called by gen_exit_function().
24    """
25
26    # If you have no cleanup to do, you can delete this function altogether.
27
28    # Your cleanup code here.
29
30
31def validate_parms():
32    r"""
33    Validate program parameters, etc.  This function will be called by gen_setup().
34    """
35
36    # If you have no validation to do, you can delete this function altogether.
37
38    # Your validation code here...
39    # valid_value(whatever)
40
41
42def main():
43    gen_setup()
44
45    # Your code here.
46
47
48main()
49