def ReadFileAsLines(filename):
  """Reads a file, removing blank lines and lines that start with #"""
  file = open(filename, "r")
  raw_lines = file.readlines()
  file.close()
  lines = []
  for line in raw_lines:
    line = line.strip()
    if len(line) > 0 and not line.startswith("#"):
      lines.append(line)
  return lines