class_docstr: Abstract base class for defining command classes, the "worker bees"
  of the Distutils.  A useful analogy for command classes is to think of
  them as subroutines with local variables called "options".  The options
  are "declared" in 'initialize_options()' and "defined" (given their
  final values, aka "finalized") in 'finalize_options()', both of which
  must be defined by every command class.  The distinction between the
  two is necessary because option values might come from the outside
  world (command line, config file, ...), and any options dependent on
  other options must be computed *after* these outside influences have
  been processed -- hence 'finalize_options()'.  The "body" of the
  subroutine, where it does all its work based on the values of its
  options, is the 'run()' method, which must also be implemented by every
  command class.
docstr: Create and initialize a new Command object.  Most importantly,
  invokes the 'initialize_options()' method, which is the real
  initializer and depends on the actual command being
  instantiated.
docstr_tok: ["Create","and","initialize","a","new","Command","object",".","Most","importantly",",","invokes","the","'initialize_options","(",")","'","method",",","which","is","the","real","initializer","and","depends","on","the","actual","command","being","instantiated","."]
code: def __init__(self, dist):
      """Create and initialize a new Command object.  Most importantly,
      invokes the 'initialize_options()' method, which is the real
      initializer and depends on the actual command being
      instantiated.
      """
      # late import because of mutual dependence between these classes
      from distutils.dist import Distribution
  
      if not isinstance(dist, Distribution):
          raise TypeError("dist must be a Distribution instance")
      if self.__class__ is Command:
          raise RuntimeError("Command is an abstract class")
  
      self.distribution = dist
      self.initialize_options()
  
      # Per-command versions of the global flags, so that the user can
      # customize Distutils' behaviour command-by-command and let some
      # commands fall back on the Distribution's behaviour.  None means
      # "not defined, check self.distribution's copy", while 0 or 1 mean
      # false and true (duh).  Note that this means figuring out the real
      # value of each flag is a touch complicated -- hence "self._dry_run"
      # will be handled by __getattr__, below.
      # XXX This needs to be fixed.
      self._dry_run = None
  
      # verbose is largely ignored, but needs to be set for
      # backwards compatibility (I think)?
      self.verbose = dist.verbose
  
      # Some commands define a 'self.force' option to ignore file
      # timestamps, but methods defined *here* assume that
      # 'self.force' exists for all commands.  So define it here
      # just to be safe.
      self.force = None
  
      # The 'help' flag is just used for command-line parsing, so
      # none of that complicated bureaucracy is needed.
      self.help = 0
  
      # 'finalized' records whether or not 'finalize_options()' has been
      # called.  'finalize_options()' itself should not pay attention to
      # this flag: it is the business of 'ensure_finalized()', which
      # always calls 'finalize_options()', to respect/update it.
      self.finalized = 0
  
imports: import sys
  import os
  import re
  import logging
  from .errors import DistutilsOptionError
  from .None import util, dir_util, file_util, archive_util, _modified
  from ._log import log
label_desc: Use image node_id 1 to create a new Command object  with example: obj = Command(dist)