from pathlib import Path
import dascore as dc
= dc.get_example_patch()
patch = Path("output.h5")
path = dc.write(patch, path, "dasdae")
_
assert path.exists()
path.unlink()
write
write(
patch_or_spool ,
path: str | pathlib.Path[str, Path] ,
file_format: str ,
file_version: str | None[str, None] = None,
**kwargs ,
)-> ‘Path’
Write a Patch or Spool to disk.
Parameters
Parameter | Description |
---|---|
path | The path to the file. |
file_format | The string indicating the format to write. |
file_version |
Optionally specify the version of the file, else use the latest version for the format. |
Raises
UnkownFiberFormatError
- Could not determine the fiber format.