def save_pkl(path, obj): with open(path, 'w') as f: cPickle.dump(obj, f) print(" [*] save %s" % path)