diff -r 234fa7eea0df -r 4cee17e91d29 com.py --- a/com.py Mon Jun 14 14:32:12 2010 +0200 +++ b/com.py Mon Jun 14 23:16:47 2010 +0200 @@ -18,11 +18,11 @@ def saveModel(socket, client, worker, (name,)): model = lookupModel(socket, client, name) if model: - pickle.dump(model, open(name, "w")) + pickle.dump(model, open(name + ".model", "w")) socket.sendto("model %s saved\n" % name, client) def loadModel(socket, client, worker, (name,)): - model.addModel(pickle.load(open(name, "r"))) + model.addModel(pickle.load(open(name + ".model", "r"))) socket.sendto("model %s loaded\n" % name, client) def lookupModel(socket, client, name): @@ -72,7 +72,8 @@ print model.range print model.resolution dump = pickle.dumps(model) - socket.sendto("%010i%s%010i" % (len(dump), dump, int(iterations)), w) + socket.sendto("%010i%s%010i" % (len(dump), dump, + int(iterations)), w) socket.sendto("model %s updated with max %s iterations\n" % (modelName, iterations), client) model.range = (complex(begin_x, begin_y), complex(end_x, end_y))