Show More
@@ -88,9 +88,7 b' def catch_config_error(method, app, *args, **kwargs):' | |||
|
88 | 88 | try: |
|
89 | 89 | return method(app, *args, **kwargs) |
|
90 | 90 | except (TraitError, ArgumentError) as e: |
|
91 | app.print_description() | |
|
92 | 91 | app.print_help() |
|
93 | app.print_examples() | |
|
94 | 92 | app.log.fatal("Bad config encountered during initialization:") |
|
95 | 93 | app.log.fatal(str(e)) |
|
96 | 94 | app.log.debug("Config at the time: %s", app.config) |
@@ -337,6 +335,7 b' class Application(SingletonConfigurable):' | |||
|
337 | 335 | |
|
338 | 336 | If classes=False (the default), only flags and aliases are printed. |
|
339 | 337 | """ |
|
338 | self.print_description() | |
|
340 | 339 | self.print_subcommands() |
|
341 | 340 | self.print_options() |
|
342 | 341 | |
@@ -356,6 +355,9 b' class Application(SingletonConfigurable):' | |||
|
356 | 355 | print "To see all available configurables, use `--help-all`" |
|
357 | 356 | |
|
358 | 357 | |
|
358 | self.print_examples() | |
|
359 | ||
|
360 | ||
|
359 | 361 | def print_description(self): |
|
360 | 362 | """Print the application description.""" |
|
361 | 363 | for p in wrap_paragraphs(self.description): |
@@ -475,9 +477,7 b' class Application(SingletonConfigurable):' | |||
|
475 | 477 | interpreted_argv = argv |
|
476 | 478 | |
|
477 | 479 | if any(x in interpreted_argv for x in ('-h', '--help-all', '--help')): |
|
478 | self.print_description() | |
|
479 | 480 | self.print_help('--help-all' in interpreted_argv) |
|
480 | self.print_examples() | |
|
481 | 481 | self.exit(0) |
|
482 | 482 | |
|
483 | 483 | if '--version' in interpreted_argv or '-V' in interpreted_argv: |
@@ -215,7 +215,7 b' class NbConvertApp(BaseIPythonApplication):' | |||
|
215 | 215 | |
|
216 | 216 | # No notebooks were specified, show help. |
|
217 | 217 | if len(self.notebooks) == 0: |
|
218 |
self.print_ |
|
|
218 | self.print_help() | |
|
219 | 219 | |
|
220 | 220 | # Show how to access help. |
|
221 | 221 | print('For help, use "ipython nbconvert --help"') |
General Comments 0
You need to be logged in to leave comments.
Login now