

def write(self, f, s):
    "\n        Write method.\n\n        Parameters\n        ----------\n        f : string\n            Path to the state file.\n        s : dictionary\n            Dict containing this PyBot's current state.\n        "
    if os.path.exists(f):
        logging.info(('Overwriting %s.' % f))
    else:
        logging.info(('Creating %s.' % f))
    fp = open(f, 'w')
    pickle.dump(s, fp)
    fp.close()

dataset/ETHPy150Open magsol/pybot/pybot/storage.py PickleStorage.write/original