|
|
@ -1,4 +1,5 @@ |
|
|
|
from tkinter import * |
|
|
|
from tkinter.filedialog import askopenfile |
|
|
|
from copy import deepcopy |
|
|
|
from time import sleep |
|
|
|
lst_c=[] |
|
|
@ -129,7 +130,8 @@ def save(): |
|
|
|
state.write(str(grille[ligne][col])+" ") |
|
|
|
def load(): |
|
|
|
global grille |
|
|
|
new_state=open(filedialog.askopenfilename(initialdir = "/",title = "Choisir un fichier",filetypes = (("Text files","*.txt*"),)),"r") |
|
|
|
new_state=askopenfile(mode="r",initialdir = "/",title = "Choisir un fichier",filetypes = [("Text files","*.txt*")]) |
|
|
|
|
|
|
|
new_state=new_state.readline() |
|
|
|
new_state=new_state.split(",") |
|
|
|
for chiffre_l in range (0,len(new_state)): |
|
|
@ -160,7 +162,7 @@ choix_col=Entry(textvariable=nb_colonne_choisi,bd=5) |
|
|
|
choix_col.grid(row=11,column=3) |
|
|
|
|
|
|
|
bout_g=Button(text="Créer la grille",command= bouton_grille) |
|
|
|
bout_g.grid(row=12,column=2) |
|
|
|
bout_g.grid(row=11,column=2) |
|
|
|
################Génération################## |
|
|
|
suivant=Button(text="Prochaine génération",command= gen_suiv) |
|
|
|
suivant.grid(row=10,column=4) |
|
|
|