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[, sep])

Read a CSV file.

read_json(path)

Read a JSON file.

read_lines(path[, mode])

Read text as lines from a file.

read_yaml(path)

Read a YAML file.

write(text, path)

Write text to a file.

write_stderr(text)

Write text to standard error of the console.