def save_pickle(obj, fname):
 with get_file_obj(fname, 'wb') as fout:
  cPickle.dump(obj, fout, protocol=(-1))

def save_pickle ( obj , fname ) : with get_file_obj ( fname , 'wb' ) as fout : cPickle . dump ( obj , fout , protocol = ( - 1 ) )
save the object to file via pickling .