def ProcessFile(file, options):
    #figure out some name stuff
    basename = os.path.splitext(os.path.basename(file))[0]
    print "Compiling " + basename
    basedir = GetBaseDirectory(file, "intermediates")
    tooldir = VerifyDirectory(basedir,"tools")
    outdir = VerifyDirectory(basedir, "data/models")
    
    tempdir = tempfile.mkdtemp()

    tempvbname = os.path.join(tempdir, "model.vb")
    inzip = zipfile.ZipFile(file, "r")
    objfile = ObjFile(inzip.open("model.obj"))
   
    if options.bigendian:
        endianstring = ">"
    else:
        endianstring = "<"
    
    outfile = open(tempvbname, 'wb')
    for face in objfile.faces:
        for vert in face:
            pos = objfile.vertices[vert[0]-1]
            tex = objfile.texcoords[1-vert[1]]
            norms = objfile.normals[vert[2]-1]
            packed = struct.pack(endianstring + "ffffffff", pos[0], pos[1], pos[2], norms[0], norms[1], norms[2], tex[0], tex[1])
            outfile.write(packed)
    outfile.close()
    
    
    inzip.extract("texture.png", tempdir)
    #convert the image file....
    
    outzip = zipfile.ZipFile(os.path.join(outdir, basename+".zip"), "w")
    for f in [ tempvbname, os.path.join(tempdir, "texture.png") ]:
        outzip.write(f, os.path.relpath(f, tempdir), zipfile.ZIP_DEFLATED)
    shutil.rmtree(tempdir)
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/unix/mod_tools/tools/scripts/compilemodel.py/ProcessFile/swapped operands of `-`