Globals/AppInfo.py

changeset 2087
795992a5c561
child 2302
f29e9405c851
equal deleted inserted replaced
2085:b4c1f0b6dac2 2087:795992a5c561
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a function to generate an application info.
8 """
9
10 from UI.Info import Version
11
12
13 def makeAppInfo(argv, name, arg, description, options=[]):
14 """
15 Module function to generate a dictionary describing the application.
16
17 @param argv list of commandline parameters (list of strings)
18 @param name name of the application (string)
19 @param arg commandline arguments (string)
20 @param description text describing the application (string)
21 @param options list of additional commandline options
22 (list of tuples of two strings (commandline option, option description)).
23 The options --version, --help and -h are always present and must not
24 be repeated in this list.
25 @return dictionary describing the application
26 """
27 return {
28 "bin": argv[0],
29 "arg": arg,
30 "name": name,
31 "description": description,
32 "version": Version,
33 "options": options
34 }

eric ide

mercurial