Hello,
ti 21. syysk. 2021 klo 16.53 Mohsen Owzar (mohsen.ow...@gmail.com) kirjoitti: > Hi Guys > Long time ago I've written a program in Malab a GUI for solving Sudoku > puzzles, which worked not so bad. > Now I try to write this GUI with Python with PyQt5 or TKinter. > First question is: > Is there any free OCR software, packages or code in Python, which I can > use to recognize the given digits and their positions in the puzzle square. > to my knowledge there is no Python package for OCR. Using a free OCR package that has a command line interface one could integrate this into a Python script that makes a call to this external OCR e.g. using Python module subprocess. BR, Roland > Second: > Because, I can not attach a picture to this post, I try to describe my > picture of my GUI. > It is a 3x3 block / matrix (one third of the whole Sudoku 9x9 block). > This block must be placed three times in row and columns. > Each square of this 3x3 block has 3x3 digits from 1 to 9 at the > initialization time. These digits are spread out in 3x3 equal distances. > These are small fonts and black. > The values given by the puzzle are red big fonts and not changeable > The digits typed by the user are black big fonts and changeable > If there is a big font from the Puzzle / User, these must be removed from > the neighboring fields from the 3x3 matrix (1-9). > Now my question is, actually a hint from your side: > What should I take as widget for one of these small squares to have > different content as I described above? > I thought of a QLineEdit in PyQt5 or LineEdit in TKinter, because the user > must type some values in there and therefore can not be labels. So again, > for the sake of the clarity. > • When the fields are empty, each square has to show digits from 1 > to 9 with small fonts in 3x3 matrix order. > • Given values in the puzzle are big fonts and red. > • Digits which are typed by the user are big fonts and black. > Now the question is, can I take only one LineEdit for all these tree > situations, or I have to implement 9 small squares for small fonts and a > big one for the big fonts? > Any help and suggestion is welcome and appreciated. > > Best regards > Mohsen > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list