Muscat.IO.PickleTools module

CheckIntegrity(GUI: bool = False)[source]

AutoTest routine

class IOHelper(data)[source]

Bases: object

helper Class that represent the data from a file

LoadData(filename: str) Any[source]

Load data from disk using pickle format

Load data saved with the ‘saveData’ from file

Parameters:

filename (str) – File name to use

Returns:

return an instance of IOHelper if ok return None if not ok

Return type:

IOHelper | None

class PickleReader(fileName: str = '')[source]

Bases: ReaderBase

Class handling the reading of data using pickle

Read()[source]

Reads data using pickle

Returns:

read data

Return type:

any

class PickleWriter[source]

Bases: object

Class handling the writing of data using pickle

Close()[source]
Open(fileName=None)[source]
SetBinary(val=True)[source]
SetFileName(filename)[source]

Sets filename

Parameters:

filename (str) – name of the file to write

Write(mesh, PointFields=None, CellFields=None, GridFields=None, PointFieldsNames=None, CellFieldsNames=None, GridFieldsNames=None)[source]

Writes data using pickle

SaveData(filename: str, *argv, **kwargs) int[source]

Save the variables into the disk and return 0 if all ok

Save variables into the disk, you can use unnamed or named variables (keyword)

Parameters:

filename (str) – File name to

Returns:

0 if everything ok

Return type:

int