Show More
@@ -54,7 +54,7 b' if not hasattr(sys, "argv"):' | |||||
54 | subcommand_description = """ |
|
54 | subcommand_description = """ | |
55 | Subcommands are launched as `{app} cmd [args]`. For information on using |
|
55 | Subcommands are launched as `{app} cmd [args]`. For information on using | |
56 | subcommand 'cmd', do: `{app} cmd -h`. |
|
56 | subcommand 'cmd', do: `{app} cmd -h`. | |
57 | """.strip().format(app=os.path.basename(sys.argv[0])) |
|
57 | """ | |
58 | # get running program name |
|
58 | # get running program name | |
59 |
|
59 | |||
60 | #----------------------------------------------------------------------------- |
|
60 | #----------------------------------------------------------------------------- | |
@@ -310,7 +310,8 b' class Application(SingletonConfigurable):' | |||||
310 | lines = ["Subcommands"] |
|
310 | lines = ["Subcommands"] | |
311 | lines.append('-'*len(lines[0])) |
|
311 | lines.append('-'*len(lines[0])) | |
312 | lines.append('') |
|
312 | lines.append('') | |
313 |
for p in wrap_paragraphs(self.subcommand_description |
|
313 | for p in wrap_paragraphs(self.subcommand_description.format( | |
|
314 | app=os.path.basename(self.argv[0]))): | |||
314 | lines.append(p) |
|
315 | lines.append(p) | |
315 | lines.append('') |
|
316 | lines.append('') | |
316 | for subc, (cls, help) in iteritems(self.subcommands): |
|
317 | for subc, (cls, help) in iteritems(self.subcommands): |
General Comments 0
You need to be logged in to leave comments.
Login now