parameters: (self)
return_statement: return " ".join(sb)
docstring: Returns an equivalent command line invocation of the process.
docstring_summary: Returns an equivalent command line invocation of the process.
docstring_tokens: Returns an equivalent command line invocation of the process .
function: def as_command(self):
          """
          Returns an equivalent command line invocation of the process.
          """
  
          default_env = os.environ
          env_diff = self.env.copy()
  
          # Remove environment variables that appear in both 'os.environ' and 'self.env'.
          for env_var in default_env:
              if env_var in env_diff and env_diff[env_var] == default_env[env_var]:
                  del env_diff[env_var]
  
          sb = []  # String builder.
          for env_var in env_diff:
              sb.append("%s=%s" % (env_var, env_diff[env_var]))
          sb.extend(self.args)
  
          return " ".join(sb)
function_tokens: def as_command ( self ) : default_env = os . environ env_diff = self . env . copy ( ) # Remove environment variables that appear in both 'os.environ' and 'self.env'. for env_var in default_env : if env_var in env_diff and env_diff [ env_var ] == default_env [ env_var ] : del env_diff [ env_var ] sb = [ ] # String builder. for env_var in env_diff : sb . append ( "%s=%s" % ( env_var , env_diff [ env_var ] ) ) sb . extend ( self . args ) return " " . join ( sb )