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