Exemplo n.º 1
0
def save(filename, annotations):
    name, ext = os.path.splitext(filename)

    if (ext == ".gz" or ext == ".bz2"):
        name, ext = os.path.splitext(name)

    if (ext == ".idl"):
        return saveIDL(filename, annotations)

    elif (ext == ".al"):
        return saveXML(filename, annotations)

    elif (ext == ".pal"):
        return PalLib.savePal(filename, PalLib.al2pal(annotations))

    else:
        assert (False)
        return False
Exemplo n.º 2
0
def save(filename, annotations):
	name, ext = os.path.splitext(filename)

	if (ext == ".gz" or ext == ".bz2"):
		name, ext = os.path.splitext(name)
	
	if(ext == ".idl"):
		return saveIDL(filename, annotations)		

	elif(ext == ".al"):
		return saveXML(filename, annotations)

	elif(ext == ".pal"):
		return PalLib.savePal(filename, PalLib.al2pal(annotations));

	else:
		assert(False);
		return False;
Exemplo n.º 3
0
def save(filename, annotations):
    print "saving: ", filename;

    name, ext = os.path.splitext(filename)

    if (ext == ".gz" or ext == ".bz2"):
        name, ext = os.path.splitext(name)

    if(ext == ".idl"):
        return saveIDL(filename, annotations)           

    elif(ext == '.json'):
        return saveJSON(filename, annotations)

    elif(ext == ".al"):
        return saveXML(filename, annotations)

    elif(ext == ".pal"):
        return PalLib.savePal(filename, PalLib.al2pal(annotations));


    else:
        assert(False);
        return False;