first commit

This commit is contained in:
2018-11-29 22:10:08 +01:00
parent 9376c866d6
commit 226a509d53
35 changed files with 526 additions and 0 deletions

View File

@ -0,0 +1 @@
parser.add_argument("echo", help="echo the string you use here")

View File

@ -0,0 +1 @@
parser.add_arguments(StrOption('echo', 'echo the string you use here', properties=('mandatory', 'positional')))

View File

@ -0,0 +1 @@
parser.add_argument("echo", help="echo the string you use here", default='blah', nargs='?')

View File

@ -0,0 +1 @@
parser.add_arguments(StrOption('echo', 'echo the string you use here', properties=('mandatory', 'positional'), default='blah'))

View File

@ -0,0 +1,2 @@
parser.add_argument("square", help="display a square of a given number",
type=int)

View File

@ -0,0 +1 @@
parser.add_arguments(IntOption('square', 'display a square of a given number', properties=('mandatory', 'positional')))

View File

@ -0,0 +1 @@
parser.add_argument("echo", help="echo the string you use here", nargs='+')

View File

@ -0,0 +1 @@
parser.add_arguments(StrOption('echo', 'echo the string you use here', properties=('mandatory', 'positional'), multi=True))

View File

@ -0,0 +1 @@
parser.add_argument('--verbosity', help='increase output verbosity', action='store_true')

View File

@ -0,0 +1 @@
parser.add_arguments(BoolOption('verbosity', 'increase output verbosity', default=False))

View File

@ -0,0 +1 @@
parser.add_argument('--verbosity', help='increase output verbosity', action='store_false')

View File

@ -0,0 +1 @@
parser.add_arguments(BoolOption('verbosity', 'increase output verbosity', default=True))

View File

@ -0,0 +1,2 @@
parser.add_argument('--door', help='Door numbers', choices=['1', '2', '3'])

View File

@ -0,0 +1 @@
parser.add_arguments(ChoiceOption('door', 'Door numbers', ('1', '2', '3')))

View File

@ -0,0 +1,2 @@
parser.add_argument('--int', help='integer', type=int)

View File

@ -0,0 +1 @@
parser.add_arguments(IntOption('int', 'integer'))

View File

@ -0,0 +1,2 @@
parser.add_argument('--foo', help='foo help')

View File

@ -0,0 +1,2 @@
parser.add_arguments(StrOption('foo', 'foo help'))

View File

@ -0,0 +1,2 @@
parser.add_argument('--foo', help='foo help', nargs='*')

View File

@ -0,0 +1,2 @@
parser.add_arguments(StrOption('foo', 'foo help', multi=True))

View File

@ -0,0 +1,2 @@
parser.add_argument('--door', help='Door numbers', choices=[1, 2, 3])

View File

@ -0,0 +1 @@
parser.add_arguments(ChoiceOption('door', 'Door numbers', (1, 2, 3)))

View File

@ -0,0 +1,2 @@
parser.add_argument('--foo', help='foo help', default='default', nargs='?')

View File

@ -0,0 +1,2 @@
parser.add_arguments(StrOption('foo', 'foo help', 'default'))

View File

@ -0,0 +1 @@
parser.add_argument('-f', '--foo', help='foo help')

View File

@ -0,0 +1,3 @@
str_long = StrOption('foo', 'foo help')
str_short = SymLinkOption('f', str_long)
parser.add_arguments([str_long, str_short])

View File

@ -0,0 +1,2 @@
parser.add_argument('-v', help='increase output verbosity', action='store_true')
parser.add_argument('-s', help='second argument', action='store_true')

View File

@ -0,0 +1 @@
parser.add_arguments([BoolOption('v', 'increase output verbosity', default=False), BoolOption('s', 'second argument', default=False)])

View File

@ -0,0 +1,3 @@
parser.add_argument("echo", help="echo the string you use here")
parser.add_argument('--verbosity', help='increase output verbosity', action='store_true')

View File

@ -0,0 +1,3 @@
parser.add_arguments([StrOption('echo', 'echo the string you use here', properties=('mandatory', 'positional')),
BoolOption('verbosity', 'increase output verbosity', default=False)])

View File

@ -0,0 +1,2 @@
parser.add_argument('-v', help='increase output verbosity', action='store_true')
parser.add_argument('-i', '--int', help='integer', type=int)

View File

@ -0,0 +1,4 @@
int_long = IntOption('int', 'integer')
parser.add_arguments([BoolOption('v', 'increase output verbosity', default=False),
int_long,
SymLinkOption('i', int_long)])