]> gitweb.michael.orlitzky.com - dead/census-tools.git/blob - src/CLI.py
Set a default usage=None for the CLI.default_option_parser() function.
[dead/census-tools.git] / src / CLI.py
1 from optparse import OptionParser
2
3 import Configuration.Defaults
4
5
6 def default_option_parser(usage=None):
7 # -h (help) Conflicts with -h HOSTNAME
8 parser = OptionParser(usage=usage, add_help_option = False)
9
10 parser.add_option('-h',
11 '--host',
12 help='The hostname/address where the database is located.',
13 default=Configuration.Defaults.DATABASE_HOST)
14
15 parser.add_option('-d',
16 '--database',
17 help='The database in which the population data are stored.',
18 default=Configuration.Defaults.DATABASE_NAME)
19
20 parser.add_option('-U',
21 '--username',
22 help='The username who has access to the database.',
23 default=Configuration.Defaults.DATABASE_USERNAME)
24
25 return parser