NoticeFile

class hoomd.device.NoticeFile(device, level=1)

A file-like object that writes to a Device notice stream.

Parameters:
  • device (Device) – The Device object.

  • level (int) – Message notice level. Default value is 1.

Example:

notice_file = hoomd.device.NoticeFile(device=device)

Note

Use this in combination with Device.message_filename to combine notice messages with output from code that expects file-like objects (such as hoomd.write.Table).

flush()

Flush the output.

writable()

Provide file-like API call writable.

write(message)

Writes data to the associated devices notice stream.

Parameters:

message (str) – Message to write.

Example:

notice_file.write("Message\n")