class_docstr: Represents a host/target platform and its specific build attributes.
class_docstr_tok: ["Represents","a","host\/target","platform","and","its","specific","build","attributes","."]
code: def __init__(self, platform):
      self._platform = platform
      if self._platform is not None:
          return
      self._platform = sys.platform
      if self._platform.startswith("linux"):
          self._platform = "linux"
      elif self._platform.startswith("freebsd"):
          self._platform = "freebsd"
      elif self._platform.startswith("gnukfreebsd"):
          self._platform = "freebsd"
      elif self._platform.startswith("openbsd"):
          self._platform = "openbsd"
      elif (
          self._platform.startswith("solaris")
          or self._platform == "sunos5"
      ):
          self._platform = "solaris"
      elif self._platform.startswith("mingw"):
          self._platform = "mingw"
      elif self._platform.startswith("win"):
          self._platform = "msvc"
      elif self._platform.startswith("bitrig"):
          self._platform = "bitrig"
      elif self._platform.startswith("netbsd"):
          self._platform = "netbsd"
      elif self._platform.startswith("aix"):
          self._platform = "aix"
      elif self._platform.startswith("os400"):
          self._platform = "os400"
      elif self._platform.startswith("dragonfly"):
          self._platform = "dragonfly"
  
imports: from optparse import OptionParser
  import os
  import shlex
  import subprocess
  import sys
  import ninja_syntax
label_desc: Use image node_id 1 to create a new Platform object from inherited base classes: object with example: obj = Platform(platform)