Functions and classes related to file and directory handling, data)[source]

Save data (of any sort) as a pickle file.

simple wrapper of the cPickle module in core python, encoding='utf-8-sig')[source]

Load data from a pickle or JSON file.


encoding (str) – The encoding to use when reading a JSON file. This parameter will be ignored for any other file type., dst, pattern=None)[source]

Merge a folder into another.

Existing files in dst folder with the same name will be overwritten. Non-existent files/folders will be created., append=False, fileCollisionMethod='rename', encoding='utf-8-sig')[source]

Open an output file (or standard output) for writing.


fileNameNone, ‘stdout’, or str

The desired output file name. If None or stdout, return sys.stdout. Any other string will be considered a filename.

appendbool, optional

If True, append data to an existing file; otherwise, overwrite it with new data. Defaults to True, i.e. appending.

fileCollisionMethodstring, optional

How to handle filename collisions. Valid values are ‘rename’, ‘overwrite’, and ‘fail’. This parameter is ignored if append is set to True. Defaults to rename.

encodingstring, optional

The encoding to use when writing the file. This parameter will be ignored if append is False and fileName ends with .psydat or .npy (i.e. if a binary file is to be written). Defaults to 'utf-8'.



A writable file handle.[source]

Return a delimiter based on a filename.



The output file name.



A delimiter picked based on the supplied filename. This will be , if the filename extension is .csv, and a tabulator character otherwise.

Back to top