call the method self.main_help_text with an argument commands_only set to boolean True, append new line to it, write it to sys.stdout.
sys . stdout . write ( self . main_help_text ( commands_only = True ) + '\n' )