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