- Timestamp:
- Sep 14, 2017, 1:36:08 PM (7 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 5db398e
- Parents:
- 70762c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/cmd.py
r70762c5 r8a3acad 22 22 subparsers = parser.add_subparsers(title='commands', dest='command', 23 23 metavar="") 24 25 parser_add_subcommand_help(subparsers) 24 26 25 27 parser_add_subcommand_onset(subparsers) … … 33 35 34 36 return parser 37 38 def parser_add_subcommand_help(subparsers): 39 # global help subcommand 40 subparsers.add_parser('help', 41 help='show help message', 42 formatter_class = argparse.ArgumentDefaultsHelpFormatter) 35 43 36 44 def parser_add_subcommand_onset(subparsers): … … 437 445 elif 'verbose' in args and args.verbose > 3: 438 446 sys.stderr.write('aubio version ' + aubio.version + '\n') 439 if 'command' not in args or args.command is None :447 if 'command' not in args or args.command is None or args.command in ['help']: 440 448 # no command given, print help and return 1 441 449 parser.print_help() 442 sys.exit(1) 450 if args.command and args.command in ['help']: 451 sys.exit(0) 452 else: 453 sys.exit(1) 443 454 elif not args.source_uri and not args.source_uri2: 444 455 sys.stderr.write("Error: a source is required\n")
Note: See TracChangeset
for help on using the changeset viewer.