Beispiel #1
0
def save(recording):
    
    file_path = os.path.join(RECORD_DIR, removeDisallowedFilenameChars(recording.file_name))
    record_data = dumps(recording)
    
    with open(file_path,'wb') as f:
        f.write(record_data)
def export_moveset(moveset):
    global _MOVESET_SUFFIX
    global _EXPORTED_MOVESETS
    
    moveset_data = dumps(moveset)
    file_name =  removeDisallowedFilenameChars(moveset.name) + _MOVESET_SUFFIX
    
    with open(os.path.join(_EXPORTED_MOVESETS_DIR, file_name),'wb') as f:
        f.write(moveset_data)