33 ("--version", "show the program's version number and exit"), |
33 ("--version", "show the program's version number and exit"), |
34 ("-h, --help", "show this help message and exit") |
34 ("-h, --help", "show this help message and exit") |
35 ] |
35 ] |
36 options.extend(appinfo["options"]) |
36 options.extend(appinfo["options"]) |
37 |
37 |
38 print(""" |
38 print("""\n""" |
39 Usage: {bin} [OPTIONS] {arg} |
39 """Usage: {bin} [OPTIONS] {arg}\n""" |
40 |
40 """\n""" |
41 {name} - {description} |
41 """{name} - {description}\n""" |
42 |
42 """\n""" |
43 Options:""".format(**appinfo)) |
43 """Options:""".format(**appinfo)) |
44 for opt in options: |
44 for opt in options: |
45 print(" {0} {1}".format(opt[0].ljust(optlen), opt[1])) |
45 print(" {0} {1}".format(opt[0].ljust(optlen), opt[1])) |
46 sys.exit(0) |
46 sys.exit(0) |
47 |
47 |
48 |
48 |
50 """ |
50 """ |
51 Module function to show the version information. |
51 Module function to show the version information. |
52 |
52 |
53 @param appinfo dictionary describing the application |
53 @param appinfo dictionary describing the application |
54 """ |
54 """ |
55 print(""" |
55 print("""\n""" |
56 {name} {version} |
56 """{name} {version}\n""" |
57 |
57 """\n""" |
58 {description} |
58 """{description}\n""" |
59 |
59 """\n""" |
60 Copyright (c) 2002 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> |
60 """Copyright (c) 2002 - 2013 Detlev Offenbach""" |
61 This is free software; see LICENSE.GPL3 for copying conditions. |
61 """ <detlev@die-offenbachs.de>\n""" |
62 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A |
62 """This is free software; see LICENSE.GPL3 for copying""" |
63 PARTICULAR PURPOSE.""".format(**appinfo)) |
63 """ conditions.\n""" |
|
64 """There is NO warranty; not even for MERCHANTABILITY or FITNESS""" |
|
65 """ FOR A\n""" |
|
66 """PARTICULAR PURPOSE.""".format(**appinfo)) |
64 sys.exit(0) |
67 sys.exit(0) |
65 |
68 |
66 |
69 |
67 def handleArgs(argv, appinfo): |
70 def handleArgs(argv, appinfo): |
68 """ |
71 """ |