write_header

mdtools.file_handler.write_header(fname, rename=True)[source]

Create a file and write the standard MDTools header to it.

See mdtools.file_handler.header_str() for further information about what is contained in the header.

Parameters
  • fname (str) – The name of the file to create and to which to write the header.

  • rename (bool, optional) – If True and a file called fname already exists, rename it to 'fname.bak_timestamp'. See mdtools.file_handler.backup() for more details.

See also

mdtools.file_handler.header_str()

Create a standard header string for text files

mdtools.file_handler.backup()

Backup a file by renaming it