Пример #1
0
def archive(data,filename):
    """ archive data to file 
        down-converts all Data-type classes to Data, regardless of type
        helps future-proof the data to changing package structure
    """
    
    data = Data(data)
    
    def to_data(D):
        for k,v in D.items():
            if isinstance(v,Data):
                D[k] = Data(v)
                to_data(D[k])
    
    to_data(data)
    
    vypy_save(data,filename,file_format='pickle')
    
Пример #2
0
def save(data, filename):
    """ save data to file """

    vypy_save(data, filename, file_format='pickle')
Пример #3
0
def save(data,filename):
    """ save data to file """
    
    vypy_save(data,filename,file_format='pickle')