Commit 118dd557 authored by Maël RENAULT's avatar Maël RENAULT
Browse files

Update IHM_Sudoku.py

parent 9f60d285
......@@ -126,7 +126,18 @@ class Grille_sudoku(QWidget):
self.charger_une_grille(grille)
def open(self):
print(2)
options = QFileDialog.Options()
self.openFileNameLabel = ""
fileName, _ = QFileDialog.getOpenFileName(self,
"QFileDialog.getOpenFileName()", self.openFileNameLabel,
"All Files (*);;Text Files (*.txt)", options=options)
fichier = open(fileName, "r")
lignes = fichier.readlines()
grille = np.zeros((9, 9), dtype=int)
for i in range(9):
for j in range(9):
grille[i, j] = lignes[i + 1][j]
self.charger_une_grille(grille)
def save(self):
user = "louis"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment