Python Forum
project kudoSudoku follows SUDO project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
project kudoSudoku follows SUDO project
#7
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:
#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()
Reply


Messages In This Thread
project kudoSudoku follows SUDO project - by sylas - Apr-30-2018, 09:30 PM
RE: project kudoSudoku follows SUDO project - by sylas - May-08-2018, 10:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Modify project (so that it uses db, QSqlRelationalTableModel etc) panoss 0 1,347 Jan-31-2022, 10:14 PM
Last Post: panoss
Question GUI for simple python project Qwertz 4 134,746 Jan-26-2022, 10:29 AM
Last Post: menator01
  [Tkinter] remove file from current project rwahdan 2 2,385 Jul-25-2021, 09:14 AM
Last Post: Larz60+
  [Tkinter] Finishing GUI calculator project benybeastboy 3 3,215 Feb-26-2021, 04:54 PM
Last Post: kkaur
  python file(.py) not working with my tkinter project DeanAseraf1 9 7,455 Mar-22-2020, 10:58 PM
Last Post: ifigazsi
  Problem In calling a Function from another python file of project vinod2810 7 5,586 Oct-05-2019, 01:09 PM
Last Post: ichabod801
  advice getting started with GUI project loulou 1 2,019 Jun-18-2019, 01:20 PM
Last Post: Denni
  Linear algebra semester project frequency 3 3,188 Dec-02-2018, 07:12 AM
Last Post: buran
  [Tkinter] TkInter Setting Out Project MTom5 1 2,275 Aug-14-2018, 04:08 PM
Last Post: Larz60+
  Continue SUDO project sylas 6 4,127 Apr-29-2018, 04:43 PM
Last Post: sylas

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020