Python gflags.DEFINE_string() Examples
The following are 2
code examples of gflags.DEFINE_string().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
gflags
, or try the search function
.
Example #1
Source File: appcommands_example.py From google-apputils with Apache License 2.0 | 5 votes |
def __init__(self, name, flag_values, **kargs): """Init and register flags specific to command.""" super(Test1, self).__init__(name, flag_values, **kargs) # Flag --fail1 is specific to this command flags.DEFINE_boolean('fail1', False, 'Make test1 fail', flag_values=flag_values) flags.DEFINE_string('foo', '', 'Param foo', flag_values=flag_values) flags.DEFINE_string('bar', '', 'Param bar', flag_values=flag_values) flags.DEFINE_integer('intfoo', 0, 'Integer foo', flag_values=flag_values) flags.DEFINE_boolean('allhelp', False, 'Get _all_commands_help string', flag_values=flag_values)
Example #2
Source File: appcommands_example.py From google-apputils with Apache License 2.0 | 5 votes |
def __init__(self, name, flag_values, **kargs): """Init and register flags specific to command.""" super(Test2, self).__init__(name, flag_values, **kargs) flags.DEFINE_boolean('fail2', False, 'Make test2 fail', flag_values=flag_values) flags.DEFINE_string('foo', '', 'Param foo', flag_values=flag_values) flags.DEFINE_string('bar', '', 'Param bar', flag_values=flag_values)