I change my program, because with the last project, once it works once it does not work. Now, instead of "input("hit ENTER to continue")" I put exit(), and then I must run a new file named "solver.py". Here is its code:
__main__.py now is:
#solver.py import init import csv from kudoSudoku import sudoku from pprint import pprint with open('numbers.csv', newline='') as csvfile: puzzle=csv.reader(csvfile, delimiter=' ', quotechar='|') for row in puzzle:#origin print(', '.join(row))#originr matrix=row for i in range(9): matrix[i]=eval(matrix[i]) print('sylvain') print(matrix) pprint(matrix) table = sudoku(matrix) result = table.solve() pprint(result)So this version is not simple as the preceeding, but problems disappeared.
__main__.py now is:
# __main__.py """ On the tkinter image: 1. type numbers, 2. click on "solve" 3. click on "print" """ from multiprocessing import freeze_support if __name__ == '__main__': freeze_support() import SudokuSolver_class as SudokuSolver from tkinter import Tk def main(): root = Tk() app = SudokuSolver.SudokuSolver(root) root.mainloop() main()