def save(self, filename):
f = open(filename, '<STR_LIT:w>')<EOL>for e in self._entries:<EOL><INDENT>line = e.to_line()<EOL>if line:<EOL><INDENT>f.write(line)<EOL><DEDENT><DEDENT>f.close()<EOL>
Save host keys into a file, in the format used by openssh.  The order of
keys in the file will be preserved when possible (if these keys were
loaded from a file originally).  The single exception is that combined
lines will be split into individual key lines, which is arguably a bug.

@param filename: name of the file to write
@type filename: str

@raise IOError: if there was an error writing the file

@since: 1.6.1