def is_special_file(path):
 mode = os.stat(path).st_mode
 if stat.S_ISCHR(mode):
  return True
 if stat.S_ISBLK(mode):
  return True
 if stat.S_ISFIFO(mode):
  return True
 if stat.S_ISSOCK(mode):
  return True
 return False

def is_special_file ( path ) : mode = os . stat ( path ) . st_mode if stat . S_ISCHR ( mode ) : return True if stat . S_ISBLK ( mode ) : return True if stat . S_ISFIFO ( mode ) : return True if stat . S_ISSOCK ( mode ) : return True return False
this function checks to see if a special file .