parameters: (target, default='')
docstring: Interface to the system's file command.
  
          The function uses the -b option of the file command to have it
          omit the filename in its output. Follow the symlinks. It returns
          default in case the command should fail.
docstring_summary: Interface to the system's file command.
docstring_tokens: Interface to the system s file command .
function: def _syscmd_file(target, default=''):
  
      """ Interface to the system's file command.
  
          The function uses the -b option of the file command to have it
          omit the filename in its output. Follow the symlinks. It returns
          default in case the command should fail.
  
      """
      if sys.platform in ('dos', 'win32', 'win16'):
          # XXX Others too ?
          return default
      target = _follow_symlinks(target)
      try:
          proc = subprocess.Popen(['file', target],
                  stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  
      except (AttributeError, OSError):
          return default
      output = proc.communicate()[0].decode('latin-1')
      rc = proc.wait()
      if not output or rc:
          return default
      else:
          return output
function_tokens: def _syscmd_file ( target , default = '' ) : if sys . platform in ( 'dos' , 'win32' , 'win16' ) : # XXX Others too ? return default target = _follow_symlinks ( target ) try : proc = subprocess . Popen ( [ 'file' , target ] , stdout = subprocess . PIPE , stderr = subprocess . STDOUT ) except ( AttributeError , OSError ) : return default output = proc . communicate ( ) [ 0 ] . decode ( 'latin-1' ) rc = proc . wait ( ) if not output or rc : return default else : return output