Beispiel #1
0
def readcomp(filename):
	"""Loads a text model from file and saves it to compare_model."""
	global compare_model
	model_name = filename.split("/")[-1].split("\\")[-1]
	model = TextModel(model_name)
	model.readModelFromFiles("models/" + filename + ".model")
	tkMessageBox.showinfo("Success", "Success! Model " + filename + ".model has been loaded.")
	print model
	compare_model = model
	compare_model_name.set("Comparison model: " + model_name)
	enable_sample_2_buttons()
Beispiel #2
0
def read(filename):
	"""Loads a text model from file and saves it to global_model."""
	global global_model
	model_name = filename.split("/")[-1].split("\\")[-1]
	model = TextModel(model_name)
	model.readModelFromFiles("models/" + filename + ".model")
	print model
	tkMessageBox.showinfo("Success", "Success! Model " + filename + ".model has been loaded.")
	current_model_name.set("Current model: " + model_name)
	if global_model == None:
		enable_sample_1_buttons()
	global_model = model