parameters: (self, subc, argv=None)
docstring: Initialize a subcommand with argv.
docstring_summary: Initialize a subcommand with argv.
docstring_tokens: Initialize a subcommand with argv .
function: def initialize_subcommand(self, subc, argv=None):
          """Initialize a subcommand with argv."""
          subapp, _ = self.subcommands.get(subc)
  
          if isinstance(subapp, str):
              subapp = import_item(subapp)
  
          ## Cannot issubclass() on a non-type (SOhttp://stackoverflow.com/questions/8692430)
          if isinstance(subapp, type) and issubclass(subapp, Application):
              # Clear existing instances before...
              self.__class__.clear_instance()
              # instantiating subapp...
              self.subapp = subapp.instance(parent=self)
          elif callable(subapp):
              # or ask factory to create it...
              self.subapp = subapp(self)
          else:
              raise AssertionError("Invalid mappings for subcommand '%s'!" % subc)
  
          # ... and finally initialize subapp.
          self.subapp.initialize(argv)
function_tokens: def initialize_subcommand ( self , subc , argv = None ) : subapp , _ = self . subcommands . get ( subc ) if isinstance ( subapp , str ) : subapp = import_item ( subapp ) ## Cannot issubclass() on a non-type (SOhttp://stackoverflow.com/questions/8692430) if isinstance ( subapp , type ) and issubclass ( subapp , Application ) : # Clear existing instances before... self . __class__ . clear_instance ( ) # instantiating subapp... self . subapp = subapp . instance ( parent = self ) elif callable ( subapp ) : # or ask factory to create it... self . subapp = subapp ( self ) else : raise AssertionError ( "Invalid mappings for subcommand '%s'!" % subc ) # ... and finally initialize subapp. self . subapp . initialize ( argv )