miscset.io

File and other stream i/o methods.

Writing to

  • text files

  • stderr

or reading from

  • text files as lines

  • yaml or json files as dictionaries

  • csv files as array

or parsing data (dictionary, json/yaml) to and from a Parsable class object made easy!

Classes

Parsable()

A class where slots are parsable.

Functions

read_csv(path, *args, **kwargs)

Read a CSV file.

read_json(path)

Read a JSON file.

read_lines(path[, strip])

Read text as lines from a file.

read_tiff(path)

Read TIFF image using tifffile.

read_tiff_tags(path[, parser, prefix])

Read TIFF metadatad.

read_txt(path, *args, **kwargs)

Read text as string from a file.

read_xl(path, *args, **kwargs)

Read an EXCEL table.

read_yaml(path)

Read a YAML file.

write_json(path, obj[, default])

Write an object representation to a json file.

write_stderr(text[, newline])

Write text to the standard error file stream.

write_stdout(text[, newline])

Write text to the standard output file stream.

write_txt(text, path)

Write text to a file.