nbless.helpers package¶
Submodules¶
nbless.helpers.write_file module¶
-
nbless.helpers.write_file.
write_file
(filename: str, contents: str) → None[source]¶ Writes contents to a file with a given filename :param filename: The name of the target file :param contents: The contents of the target file
Examples
>>> import tempfile >>> outfile_path = tempfile.mkstemp()[1] >>> write_file(outfile_path, "Test file contents") >>> with open(outfile_path) as file: ... file.read() 'Test file contents'