parameters: (*args)
return_statement: return platform
docstring: Helper to format the platform string in a filename
          compatible format e.g. "system-version-machine".
docstring_summary: Helper to format the platform string in a filename
          compatible format e.g. "system-version-machine".
docstring_tokens: Helper to format the platform string in a filename compatible format e . g . system - version - machine .
function: def _platform(*args):
  
      """ Helper to format the platform string in a filename
          compatible format e.g. "system-version-machine".
      """
      # Format the platform string
      platform = string.join(
          map(string.strip,
              filter(len, args)),
          '-')
  
      # Cleanup some possible filename obstacles...
      replace = string.replace
      platform = replace(platform,' ','_')
      platform = replace(platform,'/','-')
      platform = replace(platform,'\\','-')
      platform = replace(platform,':','-')
      platform = replace(platform,';','-')
      platform = replace(platform,'"','-')
      platform = replace(platform,'(','-')
      platform = replace(platform,')','-')
  
      # No need to report 'unknown' information...
      platform = replace(platform,'unknown','')
  
      # Fold '--'s and remove trailing '-'
      while 1:
          cleaned = replace(platform,'--','-')
          if cleaned == platform:
              break
          platform = cleaned
      while platform[-1] == '-':
          platform = platform[:-1]
  
      return platform
function_tokens: def _platform ( * args ) : # Format the platform string platform = string . join ( map ( string . strip , filter ( len , args ) ) , '-' ) # Cleanup some possible filename obstacles... replace = string . replace platform = replace ( platform , ' ' , '_' ) platform = replace ( platform , '/' , '-' ) platform = replace ( platform , '\\' , '-' ) platform = replace ( platform , ':' , '-' ) platform = replace ( platform , ';' , '-' ) platform = replace ( platform , '"' , '-' ) platform = replace ( platform , '(' , '-' ) platform = replace ( platform , ')' , '-' ) # No need to report 'unknown' information... platform = replace ( platform , 'unknown' , '' ) # Fold '--'s and remove trailing '-' while 1 : cleaned = replace ( platform , '--' , '-' ) if cleaned == platform : break platform = cleaned while platform [ - 1 ] == '-' : platform = platform [ : - 1 ] return platform