SNN2.src.io.pickleHandler module

Pickle handler module

Use this module to manage pickle objects. It permits to load and save pickle objects. It must be initialized with the variables required to create uniquePickleFiles.

class SNN2.src.io.pickleHandler.PickleHandler(IoH: IOHandler, ExpID: str, logger: LogHandler, hash: str = '', unix_time: str = '')

Bases: object

PickleHandler.

General Pickle object handler class

check(name: str, **kwargs) bool

check. Check if a given name corresponds to an existsing pickle file

Parameters:

name (str) – name

Return type:

bool

load(name: str, **kwargs) Any

load. Given a name load the corresponding object and returns it

Parameters:

name (str) – name

Return type:

object

save(object: object, name: str, override: bool = False, **kwargs) None

save. Function used to save an object to a file with the given name

Parameters:
  • object (object) – object that needs to be saved

  • name (str) – name of the file to write

  • override – override if true then the file will be overwritten otherwise an exception will be throw

Return type:

None